コード例 #1
0
 public AdvancedEditWindow(a_animes AnimeToChange, AniMoDBEntities db)
 {
     ResourceDictionary d = new ResourceDictionary();
     d.Add("vm", new AdvancedEditVM(db, AnimeToChange));
     this.Resources.MergedDictionaries.Add(d);
     InitializeComponent();
 }
コード例 #2
0
 public LogInWindowVM()
 {
     dbModel = new AniMoDBEntities();
     Exit = new RelayCommand<object>(o => { close(); });
     LogIn = new RelayCommand<object>(startApp);
     Register = new RelayCommand<object>(o => { register(); });
 }
コード例 #3
0
        public AnimeDetailsWindowVM(MainWindowVM parentVM, AnimeDetailsWindow window)
        {
            parent = parentVM;
            dbModel = parent.DBModel;
            Anime = parentVM.SelectedAnime;
            this.window = window;

        }
コード例 #4
0
        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(); });
        }
コード例 #5
0
        public FilterWindowVM(MainWindowVM parentVM, string type)
        {
            t = type;
            parent = parentVM;
            Filter = new RelayCommand<object>(filter);
            dbModel = parentVM.DBModel;

            chooseOptions();
        }
コード例 #6
0
ファイル: MainWindowVM.cs プロジェクト: mcgamer0070/AniMoCity
        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();
        }
コード例 #7
0
 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;
     }
 }
コード例 #8
0
 public RegisterWindowVM()
 {
     Register = new RelayCommand<object>(register);
     dbModel = new AniMoDBEntities();
 }
コード例 #9
0
ファイル: AnimeEditVM.cs プロジェクト: mcgamer0070/AniMoCity
 public AnimeEditVM(a_animes animeToChange, AniMoDBEntities db, AnimeEditWindow win)
 {
     AnimeToChange = animeToChange;
     this.db = db;
     this.win = win;
 }
コード例 #10
0
 public NewListWindowVM(MainWindowVM parentVM, AniMoDBEntities dbModel)
 {
     this.dbModel = dbModel;
     parent = parentVM;
     AddList = new RelayCommand<object>(addList);
 }
コード例 #11
0
 public AdvancedEditVM(AniMoDBEntities db, a_animes animeToChange)
 {
     this.db = db;
     this.animeToChange = animeToChange;
 }