private void MainAreaButton_Click(object sender, NavigationView.NavigationItemSelectedEventArgs eventArgs)
 {
     StartActivity(typeof(MainActivity));
     Finish();
 }
Exemplo n.º 2
0
        private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            IMenuItem menuItem = e.MenuItem;

            onNavigationItemSelected(menuItem);
        }
Exemplo n.º 3
0
        ////////////////////////МЕНЮ\\\\\\\\\\\\\\\\\\\\\\
        private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            switch (e.MenuItem.ItemId)
            {
            case (Resource.Id.nav_stat_compare):
                StartActivity(typeof(CompareStat));
                Finish();
                break;

            case (Resource.Id.nav_stat_info):
                StartActivity(typeof(InfoStat));
                Finish();
                break;

            case (Resource.Id.nav_avia_info):
                StartActivity(typeof(InfoPlane));
                Finish();
                break;

            case (Resource.Id.nav_avia_compare):
                StartActivity(typeof(ComparePlane));
                Finish();
                break;

            case (Resource.Id.nav_avia_thebest):
                StartActivity(typeof(TheBestPlane));
                Finish();
                break;

            case (Resource.Id.nav_army_info):
                StartActivity(typeof(InfoTank));
                Finish();
                break;

            case (Resource.Id.nav_army_compare):
                StartActivity(typeof(CompareTank));
                Finish();
                break;

            case (Resource.Id.nav_army_thebest):
                StartActivity(typeof(TheBestTank));
                Finish();
                break;

            case (Resource.Id.nav_heli_info):
                StartActivity(typeof(InfoHeli));
                Finish();
                break;

            case (Resource.Id.nav_heli_compare):
                StartActivity(typeof(CompareHeli));
                Finish();
                break;

            case (Resource.Id.nav_heli_thebest):
                StartActivity(typeof(TheBestHeli));
                Finish();
                break;

            case (Resource.Id.nav_navy_info):
                StartActivity(typeof(InfoShip));
                Finish();
                break;

            case (Resource.Id.nav_navy_compare):
                StartActivity(typeof(CompareShip));
                Finish();
                break;

            case (Resource.Id.nav_navy_thebest):
                StartActivity(typeof(TheBestShip));
                Finish();
                break;

            case (Resource.Id.nav_dedoHerzer):
                StartActivity(typeof(Dedoherzer));
                Finish();
                break;

            case (Resource.Id.nav_memes):
                StartActivity(typeof(Memes));
                Finish();
                break;

            case (Resource.Id.nav_feedback):
                StartActivity(typeof(Feedback));
                Finish();
                break;
            }
            drawerLayout.CloseDrawers();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Navigations the view navigation item selected.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            var ft = FragmentManager.BeginTransaction();

            switch (e.MenuItem.ItemId)
            {
            case (Resource.Id.nav_aries):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(1));
                ft.Commit();
                break;

            case (Resource.Id.nav_tauro):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(2));
                ft.Commit();
                break;

            case (Resource.Id.nav_geminis):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(3));
                ft.Commit();
                break;

            case (Resource.Id.nav_cancer):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(4));
                ft.Commit();
                break;

            case (Resource.Id.nav_leo):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(5));
                ft.Commit();
                break;

            case (Resource.Id.nav_virgo):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(6));
                ft.Commit();
                break;

            case (Resource.Id.nav_libra):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(7));
                ft.Commit();
                break;

            case (Resource.Id.nav_escorpion):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(8));
                ft.Commit();
                break;

            case (Resource.Id.nav_sagitario):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(9));
                ft.Commit();
                break;

            case (Resource.Id.nav_capricornio):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(10));
                ft.Commit();
                break;

            case (Resource.Id.nav_acuario):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(11));
                ft.Commit();
                break;

            case (Resource.Id.nav_piscis):
                ft.AddToBackStack(null);
                ft.Add(Resource.Id.HomeLayout, new HoroscopoFragment(12));
                ft.Commit();
                break;
            }
            // Close drawer
            drawerLayout.CloseDrawers();
        }
 private void NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
 {
     FragmentHandler.Instance.LoadFragment(FragmentManager, e.MenuItem.ItemId);
     drawerLayout.CloseDrawers();
 }
Exemplo n.º 6
0
 private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
 {
     e.MenuItem.SetChecked(true);
     mDrawerLayout.CloseDrawers();
 }
Exemplo n.º 8
0
        void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            var ft2 = SupportFragmentManager.BeginTransaction();

            toolbar.Elevation = 8;
            switch (e.MenuItem.ItemId)
            {
            case (Resource.Id.nav_home):
                SupportInvalidateOptionsMenu();
                homeFragment = new HomeFragment();
                ft2.Replace(Resource.Id.HomeFrameLayout, homeFragment);
                ft2.Commit();
                SupportActionBar.SetTitle(Resource.String.home);
                break;

            case (Resource.Id.nav_mi_cuenta):
                SupportInvalidateOptionsMenu();
                fragmentMapa = new FragmentMiCuenta(SupportFragmentManager);
                ft2.Replace(Resource.Id.HomeFrameLayout, fragmentMapa);
                ft2.Commit();
                SupportActionBar.SetTitle(Resource.String.mi_cuenta);
                break;

            case (Resource.Id.nav_inbox):
                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.inbox);
                break;

            case (Resource.Id.nav_sucursales):

                ft2.Replace(Resource.Id.HomeFrameLayout, new FragmentMaps(SupportFragmentManager));
                ft2.Commit();

                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.sucursales);
                break;

            case (Resource.Id.nav_convenios):
                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.convenios);
                break;

            case (Resource.Id.nav_licencias):
                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.licencias);
                break;

            case (Resource.Id.nav_creditos):
                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.creditos);
                break;

            case (Resource.Id.nav_certificados):
                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.certificados);
                break;

            case (Resource.Id.nav_ayuda):
                // React on 'Friends' selection
                SupportActionBar.SetTitle(Resource.String.ayuda);
                break;

            case (Resource.Id.nav_signout):
                // React on 'Friends' selection
                Finish();
                break;
            }
            // Close drawer
            drawerLayout.CloseDrawers();
        }
Exemplo n.º 9
0
 private async void OnNavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
 {
     ToggleMenuItem(e.MenuItem);
     e.Handled = true;
     await Navigate(e.MenuItem.ItemId);
 }
Exemplo n.º 10
0
 private void ActivityCallback(object sender, NavigationView.NavigationItemSelectedEventArgs e)
 {
     InitActivity(e.MenuItem.ItemId);
 }
Exemplo n.º 11
0
 //navigation menu item click
 private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
 {
     drawerLayout.CloseDrawers();
 }
Exemplo n.º 12
0
        void NavView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            if (previousItem != null)
            {
                previousItem.SetChecked(false);
            }

            navView.SetCheckedItem(e.MenuItem.ItemId);

            previousItem = e.MenuItem;

            int id = 0;

            switch (e.MenuItem.ItemId)
            {
            case Resource.Id.nav_feed:
                id = (int)AppPage.Feed;
                break;

            case Resource.Id.nav_sessions:
                id = (int)AppPage.Sessions;
                break;

            case Resource.Id.nav_speakers:
                id = (int)AppPage.Speakers;
                break;

            case Resource.Id.nav_events:
                id = (int)AppPage.Events;
                break;

            case Resource.Id.nav_sponsors:
                id = (int)AppPage.Sponsors;
                break;

            case Resource.Id.nav_venue:
                id = (int)AppPage.Venue;
                break;

            case Resource.Id.nav_floor_map:
                id = (int)AppPage.FloorMap;
                break;

            case Resource.Id.nav_conference_info:
                id = (int)AppPage.ConferenceInfo;
                break;

            case Resource.Id.nav_mini_hacks:
                id = (int)AppPage.MiniHacks;
                break;

            case Resource.Id.nav_settings:
                id = (int)AppPage.Settings;
                break;

            case Resource.Id.nav_evals:
                id = (int)AppPage.Evals;
                break;
            }
            this.Element.OnNavigationItemSelected(new XamarinEvolve.Clients.UI.NavigationItemSelectedEventArgs
            {
                Index = id
            });
        }
Exemplo n.º 13
0
        private async void OnNavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            drawerLayout.CloseDrawer(navigationView);
            switch (e.MenuItem.ItemId)
            {
            case Resource.Id.navigation_menu_item_latest:
                await FetchNews(CNHCategory.Latest);

                break;

            case Resource.Id.navigation_menu_item_news:
                await FetchNews(CNHCategory.News);

                break;

            case Resource.Id.navigation_menu_item_education:
                await FetchNews(CNHCategory.Education);

                break;

            case Resource.Id.navigation_menu_item_education_abroadeducation:
                await FetchNews(CNHCategory.StudyAbroad);

                break;

            case Resource.Id.navigation_menu_item_education_contests:
                await FetchNews(CNHCategory.Contest);

                break;

            case Resource.Id.navigation_menu_item_club:
                await FetchNews(CNHCategory.Club);

                break;

            case Resource.Id.navigation_menu_item_entertainment:
                await FetchNews(CNHCategory.Entertainment);

                break;

            case Resource.Id.navigation_menu_item_cnhicon:
                await FetchNews(CNHCategory.NHIcon);

                break;

            case Resource.Id.navigation_menu_item_cnhinme:
                await FetchNews(CNHCategory.NHInMe);

                break;

            case Resource.Id.navigation_menu_item_outsideclass:
                await FetchNews(CNHCategory.OutsideClass);

                break;

            case Resource.Id.navigation_menu_item_trivial:
                await FetchNews(CNHCategory.Trivial);

                break;

            case Resource.Id.navigation_menu_item_about:
                OpenAbout();
                break;

            default:
                break;
            }
        }
Exemplo n.º 14
0
        void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            switch (e.MenuItem.ItemId)
            {
            case (Resource.Id.nav_start):
            {
                var activity2 = new Intent(this, typeof(Activity_Start));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_about):
            {
                var activity2 = new Intent(this, typeof(Activity_About));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_exams):
            {
                var activity2 = new Intent(this, typeof(Activity_Exams));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_times):
            {
                var activity2 = new Intent(this, typeof(Activity_Times));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_mensa):
            {
                var activity2 = new Intent(this, typeof(Activity_Mensa));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_links):
            {
                var activity2 = new Intent(this, typeof(Activity_Links));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_news):
            {
                var activity2 = new Intent(this, typeof(Activity_News));
                StartActivity(activity2);
            }
            break;

            case (Resource.Id.nav_rooms):
            {
                var activity2 = new Intent(this, typeof(Activity_Room_Search));
                StartActivity(activity2);
            }
            break;
            }


            drawerLayout.CloseDrawers();
        }
        private async void Drawer_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            Analytics.TrackEvent(e.MenuItem.TitleFormatted.ToString());

            var drawerlayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            e.MenuItem.SetChecked(true);
            switch (e.MenuItem.ItemId)
            {
            case Resource.Id.open_github:
                var uri    = Android.Net.Uri.Parse("https://github.com/truberton/UltraAwesomeTPTTimeTable");
                var intent = new Intent(Intent.ActionView, uri);
                StartActivity(intent);
                return;

            case Resource.Id.AA17:
                ClassNum = Resources.GetString(Resource.String.AA17);
                break;

            case Resource.Id.AA18:
                ClassNum = Resources.GetString(Resource.String.AA18);
                break;

            case Resource.Id.AV17:
                ClassNum = Resources.GetString(Resource.String.AV17);
                break;

            case Resource.Id.AV18:
                ClassNum = Resources.GetString(Resource.String.AV18);
                break;

            case Resource.Id.EA17:
                ClassNum = Resources.GetString(Resource.String.EA17);
                break;

            case Resource.Id.EA18:
                ClassNum = Resources.GetString(Resource.String.EA18);
                break;

            case Resource.Id.EV17:
                ClassNum = Resources.GetString(Resource.String.EV17);
                break;

            case Resource.Id.EV18:
                ClassNum = Resources.GetString(Resource.String.EV18);
                break;

            case Resource.Id.FS18:
                ClassNum = Resources.GetString(Resource.String.FS18);
                break;

            case Resource.Id.IT16E:
                ClassNum = Resources.GetString(Resource.String.IT16E);
                break;

            case Resource.Id.IT16V:
                ClassNum = Resources.GetString(Resource.String.IT16V);
                break;

            case Resource.Id.IT17E:
                ClassNum = Resources.GetString(Resource.String.IT17E);
                break;

            case Resource.Id.IT17V:
                ClassNum = Resources.GetString(Resource.String.IT17V);
                break;

            case Resource.Id.IT18E:
                ClassNum = Resources.GetString(Resource.String.IT18E);
                break;

            case Resource.Id.IT18V:
                ClassNum = Resources.GetString(Resource.String.IT18V);
                break;

            case Resource.Id.KEV17:
                ClassNum = Resources.GetString(Resource.String.KEV17);
                break;

            case Resource.Id.KIT17V:
                ClassNum = Resources.GetString(Resource.String.KIT17V);
                break;

            case Resource.Id.KIT18E:
                ClassNum = Resources.GetString(Resource.String.KIT18E);
                break;

            case Resource.Id.KK218V:
                ClassNum = Resources.GetString(Resource.String.KK218V);
                break;

            case Resource.Id.KTA17E:
                ClassNum = Resources.GetString(Resource.String.KTA17E);
                break;

            case Resource.Id.MM17:
                ClassNum = Resources.GetString(Resource.String.MM17);
                break;

            case Resource.Id.MM18:
                ClassNum = Resources.GetString(Resource.String.MM18);
                break;

            case Resource.Id.MS18:
                ClassNum = Resources.GetString(Resource.String.MS18);
                break;

            case Resource.Id.SA17:
                ClassNum = Resources.GetString(Resource.String.SA17);
                break;

            case Resource.Id.SA18:
                ClassNum = Resources.GetString(Resource.String.SA18);
                break;

            case Resource.Id.TA16E:
                ClassNum = Resources.GetString(Resource.String.TA16E);
                break;

            case Resource.Id.TA16V:
                ClassNum = Resources.GetString(Resource.String.TA16V);
                break;

            case Resource.Id.TA17E:
                ClassNum = Resources.GetString(Resource.String.TA17E);
                break;

            case Resource.Id.TA17V:
                ClassNum = Resources.GetString(Resource.String.TA17V);
                break;

            case Resource.Id.TA18E:
                ClassNum = Resources.GetString(Resource.String.TA18E);
                break;

            case Resource.Id.TA18V:
                ClassNum = Resources.GetString(Resource.String.TA18V);
                break;

            case Resource.Id.TJ18A:
                ClassNum = Resources.GetString(Resource.String.TJ18A);
                break;

            case Resource.Id.TS18E:
                ClassNum = Resources.GetString(Resource.String.TS18E);
                break;

            case Resource.Id.TS18T:
                ClassNum = Resources.GetString(Resource.String.TS18T);
                break;

            case Resource.Id.TT17E:
                ClassNum = Resources.GetString(Resource.String.TT17E);
                break;

            case Resource.Id.TT17T:
                ClassNum = Resources.GetString(Resource.String.TT17T);
                break;

            case Resource.Id.TT18E:
                ClassNum = Resources.GetString(Resource.String.TT18E);
                break;

            case Resource.Id.TT18T:
                ClassNum = Resources.GetString(Resource.String.TT18T);
                break;

            default:
                ClassNum = "226";
                break;
            }
            Preferences.Set("class_num", ClassNum);
            GetTimetable getTimeTable = new GetTimetable();

            list.Visibility   = ViewStates.Invisible;
            loader.Visibility = ViewStates.Visible;
            var timeTable = await getTimeTable.Pull("https://tpt.siseveeb.ee/veebivormid/tunniplaan/tunniplaan?oppegrupp=" + ClassNum);

            FullTimeTable     = getTimeTable.SortByDay(timeTable);
            list.Visibility   = ViewStates.Visible;
            loader.Visibility = ViewStates.Invisible;
            Preferences.Set("class_num", ClassNum);
            ClickCurrentDay();

            drawerlayout.CloseDrawers();
        }
Exemplo n.º 16
0
 protected virtual void OnNavigationItemSelected(
     NavigationView.NavigationItemSelectedEventArgs args)
 {
     RaiseEvent(args.MenuItem);
     Drawer.CloseDrawers();
 }
 private void OnNavItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs nisea)
 {
     OnOptionSelected(nisea.MenuItem.Order);
 }