コード例 #1
0
ファイル: SetFoldersForm.cs プロジェクト: mo5h/omeo
 public override void OK()
 {
     if (_wereChanges)
     {
         _wereChanges             = false;
         _folderList.DataProvider = null;
         Cursor current = Cursor.Current;
         Cursor.Current = Cursors.WaitCursor;
         try
         {
             FoldersCollection.Instance.Interrupted = true;
             FoldersCollection.Instance.WaitUntilFinished();
             Core.ResourceAP.RunUniqueJob(
                 "Modifying settings for Indexed File Folders", new MethodInvoker(SubmitChanges));
             if (!IsStartupPane)
             {
                 FoldersCollection.LoadFoldersForest();
             }
         }
         finally
         {
             Cursor.Current = current;
         }
     }
 }
コード例 #2
0
        public override void Execute(IActionContext context)
        {
            IResource folder = context.SelectedResources[0];

            if (folder.GetIntProp(FileProxy._propStatus) != _mode)
            {
                new ResourceProxy(folder).SetProp(FileProxy._propStatus, _mode);
                FoldersCollection.Instance.Interrupted = true;
                FoldersCollection.Instance.WaitUntilFinished();
                FoldersCollection.LoadFoldersForest();
            }
        }
コード例 #3
0
ファイル: FilePlugin.cs プロジェクト: mo5h/omeo
 private static void Core_StateChanged(object sender, EventArgs e)
 {
     if (Core.State == CoreState.Running)
     {
         _filesProcessor.StartThread();
         _filesProcessor.ThreadPriority = ThreadPriority.BelowNormal;
         FoldersCollection.LoadFoldersForest();
     }
     else if (Core.State == CoreState.ShuttingDown)
     {
         FoldersCollection.Instance.Interrupted = true;
         FoldersCollection.ProcessPendingFileDeletions();
     }
 }
コード例 #4
0
        public override void OK()
        {
            string exts = _textExtsList.Text;

            if (exts.Length == 0)
            {
                exts         = ".txt";
                _wereChanges = true;
            }
            if (_wereChanges)
            {
                ISettingStore settings = Core.SettingStore;
                settings.WriteString("FilePlugin", "PlainTextExts", exts);
                settings.WriteBool("FilePlugin", "IndexHidden", _indexHiddenCheckBox.Checked);
                settings.WriteBool("FilePlugin", "ViewHidden", _viewHiddenCheckBox.Checked);
                if (!IsStartupPane)
                {
                    FoldersCollection.Instance.Interrupted = true;
                    FoldersCollection.Instance.WaitUntilFinished();
                    FoldersCollection.LoadFoldersForest();
                }
            }
        }