Пример #1
0
 public AddDatabaseDialogVM(BaseQuestionBrowserVM previousWindow)
 {
     OkCommand           = new DelegateCommand <Window>(OkPress);
     CancleCommand       = new DelegateCommand <Window>(CanclePress);
     this.previousWindow = previousWindow;
     repo = new TestRepository(new TestownikContext());
 }
Пример #2
0
        //Commends Start
        private void ToBrowser(Window window)
        {
            BaseQuestionBrowserVM dataContext;

            if (SelectedTest != null)
            {
                dataContext = new BaseQuestionBrowserVM(SelectedTest.Ref);
            }
            else
            {
                dataContext = new BaseQuestionBrowserVM();
            }
            BaseQuestionBrowser trybEdycji = new BaseQuestionBrowser();

            trybEdycji.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            trybEdycji.DataContext           = dataContext;
            trybEdycji.Show();
            window.Close();
        }
Пример #3
0
        private void GoBack(Window window)
        {
            Window backWindow = null;

            switch (previousWindowType)
            {
            case WindowsTypes.Browser:
                backWindow = new BaseQuestionBrowser();
                BaseQuestionBrowserVM dataContextB = new BaseQuestionBrowserVM();
                backWindow.DataContext = dataContextB;
                break;

            case WindowsTypes.Test:    /*
                                        * backWindow = new Test();
                                        * TestVM dataContextT = new TestVM();
                                        * backWindow.DataContext = dataContextT;*/
                break;
            }

            backWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            backWindow.Show();
            window.Close();
        }