Beispiel #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();
            }
        }
Beispiel #2
0
        private static void RegistryFill(object o)
        {
            var t = (Tuple <UIFolderRegPickerWindow, UIPerformWorkWindow>)o;

            _sb            = new StringBuilder();
            _ww            = t.Item2;
            _currentFiles  = 0;
            _isFileInclude = t.Item1.IsFilesInclude;
            _isRecursing   = t.Item1.IsRecursing;
            var key = UIFolderRegPickerWindow.GetKeyFromString(t.Item1.PathName);

            _maxFiles = CalcKeyCount(key) + 1;
            UpdateRegKey(key);
            _fillData = _sb.ToString();
            t.Item2.AbortEvent.Set();
        }
Beispiel #3
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();
            }
        }