Ejemplo n.º 1
0
        public override void OnReceive(Context context, Intent intent)
        {
            // initialize app
            // example: MXDroidContainer.Initialize(new MyApp.App(), context.ApplicationContext);

            // initialize views
            MXDroidContainer.AddView <string>(typeof(Views.MessageView), ViewPerspective.Default);

            // navigate to first view
            MXDroidContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);
        }
Ejemplo n.º 2
0
        public override void OnReceive(Context context, Intent intent)
        {
            Android.Util.Log.Debug("MainReceiver", "OnReceive");

            // initialize app
            MXDroidContainer.Initialize(new BestSellers.App(), context.ApplicationContext);

            // initialize views
            MXDroidContainer.AddView <CategoryList>(typeof(Views.CategoryListView), ViewPerspective.Read);
            MXDroidContainer.AddView <BookList>(typeof(Views.BookListView), ViewPerspective.Read);
            MXDroidContainer.AddView <Book>(typeof(Views.BookView), ViewPerspective.Read);

            // navigate to first view
            MXDroidContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);
        }
Ejemplo n.º 3
0
        public override void OnReceive(Context context, Intent intent)
        {
            // initialize app
            var theApp = new App();

            MonoCross.Droid.MXDroidContainer.Initialize(theApp, context);

            // initialize views
            MXDroidContainer.AddView <object>(typeof(WelcomeScreenView));
            MXDroidContainer.AddView <DataSet>(typeof(DashboardView));
            MXDroidContainer.AddView <DataSet>(new GenericDashboardView(), ViewPerspective.Create);

            // navigate to first view
            MXDroidContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);
        }
Ejemplo n.º 4
0
        public override void Render()
        {
            SetContentView(Resource.Layout.WelcomeView);

            Button b = (Button)FindViewById(Resource.Id.myButton);

            if (b != null)
            {
                Android.Graphics.Color           color = Android.Graphics.Color.Rgb(0x62, 0x63, 0x70);
                Android.Graphics.PorterDuff.Mode mode  = Android.Graphics.PorterDuff.Mode.Multiply;

                var colorFilder = new Android.Graphics.PorterDuffColorFilter(color, mode);
                b.Background.SetColorFilter(colorFilder);
                b.Click += (sender, e) => { MXDroidContainer.Navigate("Dashboard"); };
            }
        }
Ejemplo n.º 5
0
        public override void Render()
        {
            SetContentView(Resource.Layout.DashboardView);

            // populate the Guid in the textview
            TextView t = (TextView)FindViewById(Resource.Id.txtGuidId);

            t.Text = Model.Name;

            Button b = (Button)FindViewById(Resource.Id.myDeleteButton);

            b.Click += (sender, e) =>
            {
                string s = !string.IsNullOrEmpty(Model.Name) ? Model.Name : s = "NoData";
                MXDroidContainer.Navigate(this, "WelcomeScreen/Data/" + s);
            };
        }
Ejemplo n.º 6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // assign a layout with an image
            SetContentView(Resource.Layout.Splash);

            // initialize app
            MXDroidContainer.Initialize(new App(), this.ApplicationContext);

            // initialize views
            // TODO: replace the mapping from the model to the model view here
            //MXDroidContainer.AddView<ModelClassGoesHere>(typeof(Views.ModelClassGoesHereView), ViewPerspective.Default);

            // navigate to first view
            MXDroidContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // assign a layout with an image
            SetContentView(Resource.Layout.Splash);

            CheckFiles(ApplicationContext);

            // initialize app
            MXDroidContainer.Initialize(new CustomerManagement.App(), this.ApplicationContext);

            // initialize views
            MXDroidContainer.AddView <List <Customer> >(typeof(Views.CustomerListView), ViewPerspective.Default);
            MXDroidContainer.AddView <Customer>(typeof(Views.CustomerView), ViewPerspective.Default);
            MXDroidContainer.AddView <Customer>(typeof(Views.CustomerEditView), ViewPerspective.Update);

            // navigate to first view
            MXDroidContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);
        }
Ejemplo n.º 8
0
        public override void OnReceive(Context context, Intent intent)
        {
            Android.Util.Log.Debug("MainReceiver", "OnReceive");

            CheckFiles(context);

            if (MXContainer.Instance == null)
            {
                // initialize app
                MXDroidContainer.Initialize(new CustomerManagement.App(), context.ApplicationContext);

                // initialize views
                MXDroidContainer.AddView <List <Company> >(typeof(CustomerListView), ViewPerspective.Default);
                MXDroidContainer.AddView <Company>(typeof(Views.CustomerView), ViewPerspective.Default);
                MXDroidContainer.AddView <Company>(typeof(Views.CustomerEditView), ViewPerspective.Update);
            }

            // navigate to first view
            MXDroidContainer.Navigate(null, MXContainer.Instance.App.NavigateOnLoad);
        }