public MainWindow()
 {
     printer    = new ReceiptPrinter();
     orderPage  = new OrderPage(printer);
     managePage = new ManagePage(printer);
     statsPage  = new StatisticsPage();
 }
예제 #2
0
 public StatisticManager(string bearer, Uri uri)
 {
     Uri     = uri;
     Page    = new StatisticsPage();
     Feed    = new TritterFeed(bearer);
     Stats   = new Statistics();
     Emojior = new EmojiProcessor();
 }
예제 #3
0
        /// <summary>
        /// This method is called when the "Stop Simulation" btn fires an event in the SimulationControlPanel.
        /// </summary>
        private void OnStopSimulation(UserControl uc)
        {
            TabControlSettings.SelectedTab = TabPageSettingsMain;
            AGVtimer.Enabled      = false;
            TimeLineTimer.Enabled = false;
            StatisticsPage sp = new StatisticsPage(wh, stats);

            TabPageStatistics.Controls.Add(sp);
        }
 public void gotoStatisitcs()
 {
     if (statisticsPage is null)
     {
         statisticsPage = new StatisticsPage();
     }
     CurrentPage = statisticsPage;
     OnPropertyChanged(nameof(CurrentPage));
 }
예제 #5
0
        public MainViewModel()
        {
            Main      = new MainPage();
            UserInfo  = new InfoAboutUserPage();
            Recipe    = new RecipePage();
            Statictic = new StatisticsPage();

            CurrentPage = Main;
        }
        public void NavigateTo(string key)
        {
            if (key == "Admin")
            {
                AdminPage page      = new AdminPage();
                Frame     rootFrame = Window.Current.Content as Frame;
                rootFrame.Navigate(typeof(AdminPage));
            }

            if (key == "User")
            {
                StatisticsPage page      = new StatisticsPage();
                Frame          rootFrame = Window.Current.Content as Frame;
                rootFrame.Navigate(typeof(StatisticsPage));
            }

            if (key == "Logout")
            {
                LoginPage page      = new LoginPage();
                Frame     rootFrame = Window.Current.Content as Frame;
                rootFrame.Navigate(typeof(LoginPage));
            }

            if (key == "UserManagement")
            {
                UserManagementPage page = new UserManagementPage();
                Frame rootFrame         = Window.Current.Content as Frame;

                if (rootFrame.Content as AdminPage != null)
                {
                    AdminPage adminPage = rootFrame.Content as AdminPage;
                    // get the grid of the adminPage
                    Grid adminPageGrid = VisualTreeHelper.GetChild(adminPage, 0) as Grid;
                    // get the splitview from within that grid
                    SplitView adminPageSplitView = VisualTreeHelper.GetChild(adminPageGrid, 0) as SplitView;
                    // Eventually access the content of the splitview (this is our frame we need to navigate)
                    Frame mySplitViewFrame = adminPageSplitView.Content as Frame;
                    // change the frame which is shown in here
                    mySplitViewFrame.Navigate(typeof(UserManagementPage));
                }
            }

            if (key == "CropManagement")
            {
                CropSettingsPage page      = new CropSettingsPage();
                Frame            rootFrame = Window.Current.Content as Frame;

                if (rootFrame.Content as AdminPage != null)
                {
                    AdminPage adminPage = rootFrame.Content as AdminPage;
                    // get the grid of the adminPage
                    Grid adminPageGrid = VisualTreeHelper.GetChild(adminPage, 0) as Grid;
                    // get the splitview from within that grid
                    SplitView adminPageSplitView = VisualTreeHelper.GetChild(adminPageGrid, 0) as SplitView;
                    // Eventually access the content of the splitview (this is our frame we need to navigate)
                    Frame mySplitViewFrame = adminPageSplitView.Content as Frame;
                    // change the frame which is shown in here
                    mySplitViewFrame.Navigate(typeof(CropSettingsPage));
                }
            }
        }
예제 #7
0
 public StatisticsPageVM(StatisticsPage page)
 {
     this.page = page;
 }