public AdvancedEditWindow(a_animes AnimeToChange, AniMoDBEntities db)
 {
     ResourceDictionary d = new ResourceDictionary();
     d.Add("vm", new AdvancedEditVM(db, AnimeToChange));
     this.Resources.MergedDictionaries.Add(d);
     InitializeComponent();
 }
Beispiel #2
0
 public LogInWindowVM()
 {
     dbModel = new AniMoDBEntities();
     Exit = new RelayCommand<object>(o => { close(); });
     LogIn = new RelayCommand<object>(startApp);
     Register = new RelayCommand<object>(o => { register(); });
 }
        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();
        }
Beispiel #6
0
        public MainWindowVM(string userName, AniMoDBEntities dbModel)
        {

            this.dbModel = dbModel;
            chooseUser(userName);
            createCommands();
            searchInput = "";
            message = "Successfully logged-in";
            selectedList = -1;
            anime = (from a in dbModel.a_animes
                     where a.a_title.Contains(searchInput)
                     select a).ToList();
        }
 public AnimeEditWindow(a_animes animeToChange, AniMoDBEntities db, bool newAnime = false)
 {
     ResourceDictionary m = new ResourceDictionary();
     m.Add("vm", new AnimeEditVM(animeToChange, db, this));
     this.Resources.MergedDictionaries.Add(m);
     InitializeComponent();
     if (newAnime)
     {
         AdvancedView.IsEnabled = false;
     } else
     {
         AdvancedView.IsEnabled = true;
     }
 }
 public RegisterWindowVM()
 {
     Register = new RelayCommand<object>(register);
     dbModel = new AniMoDBEntities();
 }
Beispiel #9
0
 public AnimeEditVM(a_animes animeToChange, AniMoDBEntities db, AnimeEditWindow win)
 {
     AnimeToChange = animeToChange;
     this.db = db;
     this.win = win;
 }
 public NewListWindowVM(MainWindowVM parentVM, AniMoDBEntities dbModel)
 {
     this.dbModel = dbModel;
     parent = parentVM;
     AddList = new RelayCommand<object>(addList);
 }
Beispiel #11
0
 public AdvancedEditVM(AniMoDBEntities db, a_animes animeToChange)
 {
     this.db = db;
     this.animeToChange = animeToChange;
 }