Exemplo n.º 1
0
        private void LoadApplication(string appName)
        {
            SQL_general.UpdatePoweredOn();
            switch (appName)
            {
            case "DockScheduleDisplay":
                var vm1   = new DockSchedule_VM();
                var page1 = new DockSchedule {
                    DataContext = vm1
                };
                Navigator.NavigationService = page1.NavigationFrame.NavigationService;
                page1.NavButtons.ShowPreview();
                page1.Show();
                break;

            case "DockScheduleTouch":
                var vm2   = new DockSchedule_VM();
                var page2 = new DockSchedule {
                    DataContext = vm2
                };
                Navigator.NavigationService = page2.NavigationFrame.NavigationService;
                page2.NavButtons.ShowInteractive();
                page2.Show();
                break;

            case "MachineOperations":
                var vm3   = new MachineOperations_VM();
                var page3 = new MachineOperations();
                Navigator.NavigationService = page3.NavigationFrame.NavigationService;
                page3.DataContext           = vm3;
                page3.Show();
                break;
            }
        }
Exemplo n.º 2
0
        public void clockDispatcherTimer_Tick(object sender, EventArgs e)
        {
            var now = DateTime.Now;

            if (now.Minute == 0 && now.Second == 0)
            {
                PrepareSilent();
            }
            if (now.Minute == 0 && now.Second == 30)
            {
                SQL_general.UpdatePoweredOn();
            }
        }