public MainWindow()
 {
     InitializeComponent();
     Open = new AdHocCommand(ExecuteOpen);
     _currentViewModel =(DashBoardViewModel) BootStrapper.Resolve<object>("DashBoard");
     _currentViewModel.CurrentViewModel = _currentViewModel;
     DataContext = _currentViewModel;
 }
 public DashBoardViewModel()
 {
     CurrentSeriesViewModel = (SeriesViewModel) BootStrapper.Resolve<object>("Series");
     CurrentMoviesViewModel = (MoviesViewModel) BootStrapper.Resolve<object>("Movies");
     UnmovedSeries = CurrentSeriesViewModel.FileList.Count;
     UnmovedMovies = CurrentMoviesViewModel.FileList.Count;
     OpenSeries = new AdHocCommand(ExecuteOpenSeries);
     OpenMovies = new AdHocCommand(ExecuteOpenMovies);
     NavigateToHome = new AdHocCommand(ExecuteNavigateToHome);
 }
示例#3
0
 public SeriesViewModel()
 {
     _sourcePath = Settings.Default.SourcePath;
     _destinationPath = Settings.Default.DestinationPath;
     _fileList = new ObservableCollection<EpisodeType>();
     _newFileList = new ObservableCollection<EpisodeType>();
     _currentMappings = new Dictionary<string, string>();
     SelectFolder = new AdHocCommand(ExecuteSelectFolder);
     SelectDestinationFolder = new AdHocCommand(ExecuteSelectDestinationFolder);
     AddMapping = new AdHocCommand(ExecuteAddMapping);
     RemoveMapping = new AdHocCommand(ExecuteRemoveMapping);
     MoveAllFiles = new AdHocCommand(ExecuteMoveAllFiles);
     MoveSelectedFile = new AdHocCommand(ExecuteMoveSelectedFile);
     _episodeService = BootStrapper.Resolve<IEpisdoeService>();
     FileTypes = new ObservableCollection<FileTypeValue>
                      {
                          new FileTypeValue("*.avi"),
                          new FileTypeValue("*.mkv")
                      };
     _selectedFileType = new FileTypeValue("*avi");
 }
 private void InitializeCommands()
 {
     SelectSourceFolder = new AdHocCommand(ExecuteSelectSourceFolder);
     SelectDestinationFolder = new AdHocCommand(ExecuteSelectDestinationFolder);
     AddMapping = new AdHocCommand(ExecuteAddMapping);
     RemoveMapping = new AdHocCommand(ExecuteRemoveMapping);
     MoveAllFiles = new AdHocCommand(ExecuteMoveAllFiles);
     PlayThumbnail = new AdHocCommand(ExecutePlayThumbnail);
     SelectAll = new AdHocCommand(ExecuteSelectAll);
     UnselectAll = new AdHocCommand(ExecuteUnselectAll);
 }
示例#5
0
 public MainWindow()
 {
     InitializeComponent();
     Open = new AdHocCommand(ExecuteOpen);
     DataContext = this;
 }