Ejemplo n.º 1
0
        private void bUsers_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ucUsers uc = new ucUsers()
            {
                Dock = DockStyle.Fill
            };

            LoadControl(uc);
            MainRibbon.MergeRibbon(uc.ribbonControl);
            MainRibbon.SelectedPage = MainRibbon.MergedRibbon.SelectedPage;
        }
Ejemplo n.º 2
0
 private void btnUser_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ToogleButton(btnUser);
         ucUsers oucUsers = new ucUsers();
         mainGrid.Children.Clear();
         mainGrid.Children.Add(oucUsers);
     }
     catch (Exception)
     {
         MessageBox.Show("Can not load Users");
     }
 }
Ejemplo n.º 3
0
        public void miClick(object sender, EventArgs e) // usercontrolok közötti navigáció
        {
            switch (((MenuItem)sender).Name)
            {
            case "miLogin":
                if (!USER.isLoggedIn())     //ha nincs belepve es regisztralt
                {
                    registrated();
                }
                break;

            case "miRegistration":
                if (!USER.isLoggedIn())     //ha nincs belepve atlep a regisztracios UC-ra
                {
                    ucRegistration uc = new ucRegistration();
                    uc.USER          = USER;
                    uc.rD            = registrated;
                    ccWindow.Content = uc;
                }
                break;

            case "miAlaC":     //alacarte UC
            {
                ucAlaC uc = new ucAlaC();
                uc.USER          = USER;
                ccWindow.Content = uc;
            }
            break;

            case "miMenu":     //menuk UC
            {
                ucMenu uc = new ucMenu();
                uc.USER          = USER;
                ccWindow.Content = uc;
            }
            break;

            case "miBasket":     //kosar UC
                if (USER.isLoggedIn())
                {
                    ucBasket uc = new ucBasket(USER);
                    ccWindow.Content = uc;
                }
                break;

            case "miOrders":     //rendelesek UC
                if (USER.isLoggedIn())
                {
                    ucOrders uc = new ucOrders(USER);
                    ccWindow.Content = uc;
                }
                break;

            case "miOptions":     //beallitasok UC
                if (USER.isLoggedIn())
                {
                    ucOptions uc = new ucOptions(USER);
                    ccWindow.Content = uc;
                }
                break;

            case "miLogout":     //kijelentkezes
                if (USER.isLoggedIn())
                {
                    logout();
                }
                break;

            case "miStatistic":     //statisztika UC, csak ha adminkent belepve
                if (USER.isLoggedIn() && USER.isadmin)
                {
                    ucStatistic uc = new ucStatistic();
                    uc.USER          = USER;
                    ccWindow.Content = uc;
                }
                break;

            case "miUsers":     //felhasznalok UC, csak ha adminkent belepve
                if (USER.isLoggedIn() && USER.isadmin)
                {
                    ucUsers uc = new ucUsers();
                    uc.USER          = USER;
                    ccWindow.Content = uc;
                }
                break;

            case "miMenuFood":     //menuk es etelek felvitele, csak ha adminkent belepve
                if (USER.isLoggedIn() && USER.isadmin)
                {
                    ucMenuFood uc = new ucMenuFood();
                    uc.USER          = USER;
                    ccWindow.Content = uc;
                }
                break;

            default:
                break;
            }
        }
Ejemplo n.º 4
0
 public Form1(ucUsers ucU)
 {
     InitializeComponent();
     ucU.Parent = this;
     ucUsers1   = ucU;
 }