public void Shutdown() { m_DataStore = null; m_MediaInfo = null; }
public void Startup(MGDataStore dataStore, long id) { m_DataStore = dataStore; m_MediaInfo = new MediaInfoWrapper(); }
public void Startup(MGDataStore dataStore, long id) { m_DataStore = dataStore; m_ID = id; }
internal Browser(MGDataStore ds, string path) { m_DataStore = ds; m_DimensionPath = new List<string>(path.Split('/')); UpdateCurrent(); }
public void EnqueueAction(IAction action, MGDataStore dataStore, MGFile file) { m_JobQueue.EnqueueAction(action, dataStore, file); }
public void DeleteDataStore(MGDataStore dataStore) { dataStore.Close(); m_DataMapper.RemoveDataStore(dataStore); DataStores.Remove(dataStore); }
public void RemoveDataStore(MGDataStore datastore) { }
private void RemoveDataStoreCommand_Execute(MGDataStore ds) { ds.Delete(); }
public string GetPluginSetting(MGDataStore dataStore, long pluginID, string settingName) { return string.Empty; }
public IList<Tuple<MGTag, MGFile>> GetTagOnAllFiles(MGDataStore dataStore, string tagName) { return new List<Tuple<MGTag, MGFile>>(); }
public IList<MGFile> GetFiles(MGDataStore dataStore) { return new MGFile[0]; }
public long GetFileCount(MGDataStore dataStore) { return 0; }
public void WritePluginSetting(MGDataStore dataStore, long pluginID, string settingName, string settingValue) { }
private void CreateTabGroup(MGDataStore dataStore) { var grp = new DataStoreNavigationTabGroup(dataStore); m_TabGroups.Add(new GridViewModel(grp, MessengerInstance, dataStore)); m_TabGroups.Add(new ImportViewModel(grp, MessengerInstance, dataStore)); m_TabGroups.Add(new TvShowViewModel(grp, MessengerInstance, dataStore)); }
public void RemoveFiles(IEnumerable<MGFile> files, MGDataStore store) { }
private bool RemoveDataStoreCommand_CanExecute(MGDataStore ds) { return ds != null; }
public void WriteNewDataStore(MGDataStore dataStore) { }
public void EnqueueAction(IAction action, MGDataStore dataStore, MGFile file) { lock (m_ActionWaitingQueue) { var item = new Job(action, dataStore, file); m_ActionWaitingQueue.Enqueue(item); Monitor.PulseAll(m_ActionWaitingQueue); m_AllActionItems.Add(item); } OnActionItemsChanged(); OnJobStatusChanged(); }
public void WriteNewFiles(IEnumerable<MGFile> files, MGDataStore dataStore) { }
public MGDataStore NewDataStore(string name, IDataStoreTemplate template) { var data = new MGDataStore(this, m_DataMapper); using ((data.SuspendUpdates())) { data.Template = template; data.Name = name; } foreach (string pluginTypeName in template.GetPluginTypeNames()) data.AddNewPlugin(pluginTypeName); m_DataMapper.WriteNewDataStore(data); m_DataStores.Add(data); OnDataStoresChanged(); return data; }
public GridViewModel(NavigationTabGroupBase group, IMessenger messenger, MGDataStore dataStore) : base(group, messenger) { m_DataStore = dataStore; m_DataStore.PropertyChanged += DataStorePropertyChanged; m_ActionCommands.Add(new FileContextMenuCommand("Remove", new RelayCommand<IList<MGFile>>(RemoveFile, IsNonEmpty))); foreach (var actionUnbound in m_DataStore.GetActions()) { var action = actionUnbound; m_ActionCommands.Add(new FileContextMenuCommand(action.Label, new RelayCommand<IList<MGFile>>(fs => fs.ForEach(f => m_DataStore.DoAction(f, action)), IsNonEmpty))); } }
public void Startup(MGDataStore dataStore, long id) { m_DataStore = dataStore; m_ID = id; LoadPresetsFromXml(); }
public ImportViewModel(NavigationTabGroupBase group, IMessenger messenger, MGDataStore dataStore) : base(group, messenger) { m_DataStore = dataStore; if (m_DataStore != null) { m_DataStore.PropertyChanged += m_DataStore_PropertyChanged; m_Settings = SettingInfoCollection.GetSettings((IMGPluginBase)m_DataStore.FileSourcePlugins.Single()); } m_ImportCommand = new RelayCommand(ImportCommand_Execute); m_AddDirectoryCommand = new RelayCommand(AddDirectoryCommand_Execute); m_AddExtensionCommand = new RelayCommand(AddExtensionCommand_Execute); m_RemoveDirectoryCommand = new RelayCommand<string>(RemoveDirectoryCommand_Execute, s => s != null); m_RemoveExtensionCommand = new RelayCommand<string>(RemoveExtensionCommand_Execute, s => s != null); }
public TvShowViewModel(NavigationTabGroupBase group, IMessenger messenger, MGDataStore dataStore) : base(group, messenger) { m_DataStore = dataStore; m_DataStore.PropertyChanged += DataStorePropertyChanged; m_Series = CreateRuntimeData(); }
public Job(IAction action, MGDataStore dataStore, MGFile file) { m_Action = action; m_DataStore = dataStore; m_File = file; }