Exemple #1
0
        public static void ButtonFillDirectoryClicked()
        {
            var dlg = new UIFolderRegPickerWindow(MW, true);

            if (dlg.ShowDialog() ?? false)
            {
                var work       = new Thread(DirectoryFill);
                var abortEvent = new ManualResetEvent(false);
                var w          = new UIPerformWorkWindow(MW, abortEvent, "Count directories...");
                work.Start(new Tuple <UIFolderRegPickerWindow, UIPerformWorkWindow>(dlg, w));
                if (w.ShowDialog() ?? false)
                {
                    int target = 1;
                    if (dlg.IsFilesInclude)
                    {
                        target = 3;
                    }
                    MW.SetContent();
                    if (MW.CmbxRightsType.SelectedIndex != target)
                    {
                        MW.CmbxRightsType.SelectedIndex = target;
                    }
                    MW.SetContent(_fillData);
                }
                work.Join();
            }
        }
Exemple #2
0
        public static void ButtonFillRegistryClicked()
        {
            var dlg = new UIFolderRegPickerWindow(MW, false);

            if (dlg.ShowDialog() ?? false)
            {
                var work       = new Thread(RegistryFill);
                var abortEvent = new ManualResetEvent(false);
                var w          = new UIPerformWorkWindow(MW, abortEvent, "Count reg-keys...");
                work.Start(new Tuple <UIFolderRegPickerWindow, UIPerformWorkWindow>(dlg, w));
                if (w.ShowDialog() ?? false)
                {
                    MW.SetContent();
                    if (MW.CmbxRightsType.SelectedIndex != 4)
                    {
                        MW.CmbxRightsType.SelectedIndex = 4;
                    }
                    MW.SetContent(_fillData);
                }
                work.Join();
            }
        }