WindowsPhone

❗🕜 Warning: this article may contain outdated information. Consider before using any descriptions/solutions, otherwise it still can be helpful. Help : Synonyms and name changes

Open up the sample that comes with ECO:

MonoAndroid - 1.png

Open up the sln and ignore/ok this:

MonoAndroid - 2.png

You will see this:

MonoAndroid - 3.png

The ReadMe explains the missing projects but since you are a developer you will probably not read it.

Delete the missing projects. And add new references to MonoAndroidApplication1

MonoAndroid - 4.png

Choose browse and find the assemblies you downloaded in the PhoneBuilds.zip

MonoAndroid - 5.png

Define what to start:

MonoAndroid - 6.png


private void ApplicationBarIconButton_Click(object sender, EventArgs e)
        {
            EcoServiceHelper.GetPersistenceService(_ecospace).Refresh(true);
            EcoServiceHelper.GetAsyncSupportService(_ecospace).PerformTaskAsync(new Action(() => { 
                IObjectList list = EcoServiceHelper.GetOclPsService(_ecospace).Execute("Class1.allinstances->select(a|a.Class2->notempty)");
                int noOfC1ThatHasC2s = list.Count;
                string extra = "";
                if (list.Count > 0)
                    extra = list[0].GetValue<Class1>().Attribute1;

                int noOfC1 = EcoServiceHelper.GetExtentService(_ecospace).AllInstances<Class1>().Count;

                EcoServiceHelper.GetAsyncSupportService(_ecospace).DispatchTaskToMainThread(new Action(() => { 
                    // UI Stuff - everyone is happy to see that we do this in the main thread
                        ContentStack.Children.Add(new TextBlock() { Text = "db updated, Now C1 Total: " + noOfC1.ToString() + ",\r\n Total of C1 that has C2's " + noOfC1ThatHasC2s.ToString() + " " + extra });

                }));
            }));
        }


private void ApplicationBarIconButton_Click_1(object sender, EventArgs e)
{

    Class1 c1 = new Class1(_ecospace);
    c1.Attribute1 = "Created on WindowsPhone " + DateTime.Now.ToLongTimeString();
    ContentStack.Children.Add(new TextBlock() { Text = "c1 created" });

    _ecospace.UpdateDatabase();

     
}

This page was edited 76 days ago on 02/10/2024. What links here