示例#1
0
        public MainWindow(SystemThreadingTimer timerDependency, SystemTimersTimer systemTimersTimerDependency,
                          SystemWindowsFormsTimer systemWindowsFormsTimerDependency)
        {
            InitializeComponent();
            MainViewModel mainViewModel = new MainViewModel(timerDependency, systemTimersTimerDependency, systemWindowsFormsTimerDependency);

            DataContext = mainViewModel;
        }
示例#2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            SystemThreadingTimer    systemThreadingTimerDependency    = new SystemThreadingTimer();
            SystemTimersTimer       systemTimersTimerDependency       = new SystemTimersTimer();
            SystemWindowsFormsTimer systemWindowsFormsTimerDependency = new SystemWindowsFormsTimer();
            MainWindow window = new MainWindow(systemThreadingTimerDependency, systemTimersTimerDependency, systemWindowsFormsTimerDependency);

            window.Show();
        }