Esempio n. 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Program.Main = this;
            SetContentView(Resource.Layout.activity_main);
            Loading = FindViewById <ViewGroup>(Resource.Id.loading);
            Loading.BringToFront();
            toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu);

            drawerLayout   = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            View     view          = navigationView.GetHeaderView(0);
            TextView userNavHeader = view.FindViewById <TextView>(Resource.Id.textViewHeaderUser);

            userNavHeader.Text = ConfigurationBase.Instance.UserAPP;

            navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;
            Navigate <HomeFragment>();
        }
Esempio n. 2
0
 //Redraw the control components to the correspond size
 private void Form1_Load(object sender, EventArgs e)
 {
     Loading.Size     = new Size(this.Width, this.Height);
     Loading.Location = new Point(0, 2);
     initFirstLayer();
     initSecondLayer();
     initThirdLayer();
     ShowLayer(2);
     Loading.BringToFront();
     //LoadCCLabel();
 }