//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(); }
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(); }