Пример #1
0
        private void RunProgram()
        {
            var mW = new View.MainWindow()
            {
                DataContext = new ViewModel.MainWindowViewModel()
            };

            mW.Closing += MW_Closing;
            mW.Show();

            if (!ProjectStatistics.Properties.Settings.Default.LicenseAccepted)
            {
                mW.ShowLicenseWindow();
            }
        }
Пример #2
0
 private void MW_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     View.MainWindow mW = sender as View.MainWindow;
     ViewModel.MainWindowViewModel dataContext = mW.DataContext as ViewModel.MainWindowViewModel;
     dataContext.CloseAllWindows();
 }