Beispiel #1
0
 public void Shutdown()
 {
     m_DataStore = null;
     m_MediaInfo = null;
 }
Beispiel #2
0
 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;
 }
Beispiel #4
0
 internal Browser(MGDataStore ds, string path)
 {
     m_DataStore = ds;
     m_DimensionPath = new List<string>(path.Split('/'));
     UpdateCurrent();
 }
Beispiel #5
0
 public void EnqueueAction(IAction action, MGDataStore dataStore, MGFile file)
 {
     m_JobQueue.EnqueueAction(action, dataStore, file);
 }
Beispiel #6
0
 public void DeleteDataStore(MGDataStore dataStore)
 {
     dataStore.Close();
     m_DataMapper.RemoveDataStore(dataStore);
     DataStores.Remove(dataStore);
 }
Beispiel #7
0
 public void RemoveDataStore(MGDataStore datastore)
 {
 }
 private void RemoveDataStoreCommand_Execute(MGDataStore ds)
 {
     ds.Delete();
 }
Beispiel #9
0
 public string GetPluginSetting(MGDataStore dataStore, long pluginID, string settingName)
 {
     return string.Empty;
 }
Beispiel #10
0
 public IList<Tuple<MGTag, MGFile>> GetTagOnAllFiles(MGDataStore dataStore, string tagName)
 {
     return new List<Tuple<MGTag, MGFile>>();
 }
Beispiel #11
0
 public IList<MGFile> GetFiles(MGDataStore dataStore)
 {
     return new MGFile[0];
 }
Beispiel #12
0
 public long GetFileCount(MGDataStore dataStore)
 {
     return 0;
 }
Beispiel #13
0
 public void WritePluginSetting(MGDataStore dataStore, long pluginID, string settingName, string settingValue)
 {
 }
Beispiel #14
0
        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));
        }
Beispiel #15
0
 public void RemoveFiles(IEnumerable<MGFile> files, MGDataStore store)
 {
 }
Beispiel #16
0
 private bool RemoveDataStoreCommand_CanExecute(MGDataStore ds)
 {
     return ds != null;
 }
Beispiel #17
0
 public void WriteNewDataStore(MGDataStore dataStore)
 {
 }
Beispiel #18
0
 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();
 }
Beispiel #19
0
 public void WriteNewFiles(IEnumerable<MGFile> files, MGDataStore dataStore)
 {
 }
Beispiel #20
0
 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;
 }
Beispiel #21
0
        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)));
            }
        }
Beispiel #22
0
 public void Startup(MGDataStore dataStore, long id)
 {
     m_DataStore = dataStore;
     m_ID = id;
     LoadPresetsFromXml();
 }
Beispiel #23
0
        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);
        }
Beispiel #24
0
        public TvShowViewModel(NavigationTabGroupBase group, IMessenger messenger, MGDataStore dataStore)
            : base(group, messenger)
        {
            m_DataStore = dataStore;
            m_DataStore.PropertyChanged += DataStorePropertyChanged;

            m_Series = CreateRuntimeData();
        }
Beispiel #25
0
 public Job(IAction action, MGDataStore dataStore, MGFile file)
 {
     m_Action = action;
     m_DataStore = dataStore;
     m_File = file;
 }