Beispiel #1
0
        public void Run()
        {
            Exit = false;
            while (!Exit)
            {
                // Connexion
                if (UserLogin() != DialogResult.OK)
                {
                    Exit = true;
                }
                else
                {
                    Main_Menu.Menu = Main_Menu.Submenu.NULL;

                    info_ = CultureInfo.CreateSpecificCulture(Properties.Settings.Default.Language);

                    while (Main_Menu.Menu != Main_Menu.Submenu.Quit && Main_Menu.Menu != Main_Menu.Submenu.Logout)
                    {
                        // Show Main Menu
                        Main_Menu main_menuForm = new Main_Menu();
                        main_menuForm.ShowDialog();

                        switch (Main_Menu.Menu)
                        {
                        case Main_Menu.Submenu.Administration:
                            // Show Admin Menu
                            Admin_Menu admin_menuForm = new Admin_Menu();
                            admin_menuForm.ShowDialog();
                            Main_Menu.Menu = Main_Menu.Submenu.NULL;
                            break;

                        default:
                            break;
                        }
                    }
                }
            }
        }
Beispiel #2
0
        public void Run()
        {
            Exit = false;
            while (!Exit)
            {
                // Connexion
                if (UserLogin() != DialogResult.OK) Exit = true;
                else
                {
                    Main_Menu.Menu = Main_Menu.Submenu.NULL;

                    info_ = CultureInfo.CreateSpecificCulture(Properties.Settings.Default.Language);

                    while (Main_Menu.Menu != Main_Menu.Submenu.Quit && Main_Menu.Menu != Main_Menu.Submenu.Logout)
                    {
                        // Show Main Menu
                        Main_Menu main_menuForm = new Main_Menu();
                        main_menuForm.ShowDialog();

                        switch (Main_Menu.Menu)
                        {
                            case Main_Menu.Submenu.Administration:
                                // Show Admin Menu
                                Admin_Menu admin_menuForm = new Admin_Menu();
                                admin_menuForm.ShowDialog();
                                Main_Menu.Menu = Main_Menu.Submenu.NULL;
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }