public MainWinViewModel(IMainWindow mainWindow) : base(mainWindow) { //General Player commands PlayerAboutCommand = DelegateCommand.ToCommand(PlayerAbout); PlayerSettingsCommand = DelegateCommand.ToCommand(PlayerSettings); PlayerExitCommand = DelegateCommand.ToCommand(PlayerExit); PlayerChangeOutputCommand = DelegateCommand.ToCommand(PlayerChangeOutput); //Playlist commands PlayList = new ObservableCollection <string>(); PlayListIndex = -1; PlaylistSaveCommand = DelegateCommand.ToCommand(PlaylistSave); PlaylistAddDirectoryCommnad = DelegateCommand.ToCommand(PlaylistAddDirectory); PlaylistAddFileCommand = DelegateCommand.ToCommand(PlaylistAddFile); PlaylistAddPlaylistCommand = DelegateCommand.ToCommand(PlaylistAddPlaylist); PlaylistAddUrlCommand = DelegateCommand.ToCommand(PlaylistAddUrl); PlaylistSortAscCommand = DelegateCommand.ToCommand(PlaylistSortAsc); PlaylistSortDescCommand = DelegateCommand.ToCommand(PlaylistSortDesc); PlaylistSortRandomCommand = DelegateCommand.ToCommand(PlaylistSortRandom); PlaylistSortDisticntCommand = DelegateCommand.ToCommand(PlaylistSortDisticnt); PlaylistClearCommand = DelegateCommand.ToCommand(PlaylistClear); PlaylistDeleteCommand = DelegateCommand.ToCommand(PlaylistDelete); FileExplorerNavigateHomeCommand = DelegateCommand.ToCommand(FileExplorerNavigateHome); FileExplorerAddToPlaylistCommand = DelegateCommand.ToCommand(FileExplorerAddToPlaylist); FileExplorerPlaySelectedCommand = DelegateCommand.ToCommand(FileExplorerPlaySelected); FileExplorerDoubleClickCommand = DelegateCommand.ToCommand(FileExplorerDoubleClick); MediaViewModel = new MediaLibary.MediaLibaryViewModel(mainWindow as IMediaLibaryView); Messager.Instance.SubScribe(this); }
public InputFilesViewModel() { Files = new ObservableCollection <string>(); Selected = new ObservableCollection <string>(); AddFiles = DelegateCommand.ToCommand(ExecAddFiles); AddFolder = DelegateCommand.ToCommand(ExecAddFolder); RemoveSelected = DelegateCommand.ToCommand(ExecRemoveSelected, () => Selected.Count > 0); RemoveAll = DelegateCommand.ToCommand(ExecRemoveAll, () => Files.Count > 0); }
public ExcelInteropModel() { _statuses = new StringBuilder(); StatusText = "Not connected to Excel\r\n"; ConnectCommand = DelegateCommand.ToCommand(ExecuteConnect); DisconnectCommand = DelegateCommand.ToCommand(ExecuteDisconnect); TerminateCommand = DelegateCommand.ToCommand(ExecuteTerminate); GetSetCommand = DelegateCommand.ToCommand(ExecuteGetSet); GetMatrixCommand = DelegateCommand.ToCommand(ExecuteGetMatrix); }
public OutputNamerViewModel() { Inputs = new ObservableCollection <string>(); Outputs = new ObservableCollection <string>(); CaseTransformMode = 0; OutputDirectory = "D:\\"; RenamePattern = "[N]"; Extension = "[E]"; CounterStart = 1; CounterIncrement = 1; CounterPadding = 1; Regex = false; Search = ""; Replace = ""; InsertIntoName = DelegateCommand.ToCommand(InsertName); InsertIntoExtension = DelegateCommand.ToCommand(InsertExt); }
public MediaLibaryViewModel(IMediaLibaryView mediaLibary) : base(mediaLibary) { DisplayItems = new ObservableCollection <TrackEntity>(); ListItems = new ObservableCollection <string>(); SelectedItems = new ObservableCollection <TrackEntity>(); FilterArtstsCommand = DelegateCommand.ToCommand(FilterArtsts); FilterAlbumsCommand = DelegateCommand.ToCommand(FilterAlbums); FilterYearsCommand = DelegateCommand.ToCommand(FilterYears); FilterGenreCommand = DelegateCommand.ToCommand(FilterGenre); FilterQueryCommand = DelegateCommand.ToCommand(FilterQuery); ListQueryCommand = DelegateCommand <string> .ToCommand(ListQuery); MenuAddFilesCommand = DelegateCommand.ToCommand(MenuAddFiles); MenuAddFolderCommand = DelegateCommand.ToCommand(MenuAddFolder); MenuSendToPlaylistCommand = DelegateCommand.ToCommand(MenuSendToPlaylist); MenuCreateQueryCommand = DelegateCommand.ToCommand(MenuCreateQuery); MenuBackupDbCommand = DelegateCommand.ToCommand(MenuBackupDb); }
public MainWindowViewModel(IMainWindow mainWindow) : base(mainWindow) { PackerFiles = new Dictionary <string, string> { { "TCPlayerPacker.wcx", "plugins\\wcx\\tcplayerlister\\TCPlayerPacker.wcx" }, { "TCPlayerPacker.wcx64", "plugins\\wcx\\tcplayerlister\\TCPlayerPacker.wcx64" } }; ListerFiles = new Dictionary <string, string> { { "TCPlayerLister.wlx", "plugins\\wlx\\tcplayerlister\\TCPlayerLister.wlx" }, { "TCPlayerLister.wlx64", "plugins\\wlx\\tcplayerlister\\TCPlayerLister.wlx64" } }; ExitCommand = DelegateCommand.ToCommand(Exit); InstallListerCommand = DelegateCommand.ToCommand(InstallLister, CanInstallLister); InstallPackerCommand = DelegateCommand.ToCommand(InstallPacker, CanInstallPacker); InstallDesktopShortcutCommand = DelegateCommand.ToCommand(InstallDesktopShortcut); InstallStartMenuShortcutCommand = DelegateCommand.ToCommand(InstallStartMenuShortcut); }