Exemple #1
0
        public void CreateStatisticPanel(int panelid, UCStatistic ucStatistic)
        {
            if (statisticPanel == panelid)
            {
                return;
            }

            ucStatistic.ucStatClient.Visible = false;
            ucStatistic.ucMoneyStat.Visible  = false;

            switch (panelid)
            {
            case 0: ucStatistic.ucStatClient.Visible = true; break;

            case 1: break;

            case 2: ucStatistic.ucMoneyStat.Visible = true; break;
            }

            statisticPanel = panelid;
        }
        public static void InitializeItems()
        {
            mainWindow         = new MainWindow();
            signUpWindow       = new SignUpWindow();
            IsActiveMainWindow = false;

            ucMain      = new UCMain();
            ucVehicle   = new UCVehicle();
            ucAVehicle  = new UCAVehicle();
            ucAUser     = new UCAUser();
            ucStatistic = new UCStatistic();

            mainWindow.pageGrid.Children.Add(ucMain);
            mainWindow.pageGrid.Children.Add(ucVehicle);
            mainWindow.pageGrid.Children.Add(ucAVehicle);
            mainWindow.pageGrid.Children.Add(ucAUser);
            mainWindow.pageGrid.Children.Add(ucStatistic);

            ucMain.Visibility      = System.Windows.Visibility.Hidden;
            ucVehicle.Visibility   = System.Windows.Visibility.Hidden;
            ucAVehicle.Visibility  = System.Windows.Visibility.Hidden;
            ucAUser.Visibility     = System.Windows.Visibility.Hidden;
            ucStatistic.Visibility = System.Windows.Visibility.Hidden;

            notifyIcon             = new System.Windows.Forms.NotifyIcon();
            notifyIcon.Icon        = new System.Drawing.Icon("notify.ico");
            notifyIcon.Visible     = true;
            notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyClick);

            notifyContext = new System.Windows.Forms.ContextMenu();
            notifyContext.MenuItems.Add("Выход", new EventHandler(exitContextClick));



            notifyIcon.ContextMenu = notifyContext;
        }