public AnimeDetailsWindowVM(MainWindowVM parentVM, AnimeDetailsWindow window) { parent = parentVM; dbModel = parent.DBModel; Anime = parentVM.SelectedAnime; this.window = window; }
public ListRangeManipWindowVM(MainWindowVM parentVM, AniMoDBEntities dbModel) { this.dbModel = dbModel; parent = parentVM; int start = dbModel.a_animes.ToList().IndexOf(parent.Anime.First()); int end = dbModel.a_animes.ToList().IndexOf(parent.Anime.Last()); SelectRange = new RelayCommand<object>(o => { createRange(); }); }
public FilterWindowVM(MainWindowVM parentVM, string type) { t = type; parent = parentVM; Filter = new RelayCommand<object>(filter); dbModel = parentVM.DBModel; chooseOptions(); }
private void startApp(object userName) { if(validUserName((string)userName) == true) { MainWindowVM mVM = new MainWindowVM((string)userName, dbModel); MainWindow m = new MainWindow() { DataContext = mVM}; App.Current.MainWindow.Close(); App.Current.MainWindow = m; mVM.ParentView = App.Current.MainWindow; m.Visibility = Visibility.Visible; MessageBox.Show(("Welcome, " + (string)userName), "LogIn successful", MessageBoxButton.OK); } }
public NewListWindowVM(MainWindowVM parentVM, AniMoDBEntities dbModel) { this.dbModel = dbModel; parent = parentVM; AddList = new RelayCommand<object>(addList); }