Exemple #1
0
        protected virtual void doWork(object sender, DoWorkEventArgs e)
        {
            ProgressHandler.state = ProgressState.Indeterminate;
            if (!initialized) {
                TranslatingProgressHandler.setTranslatedMessage("LoadingSettings");

                if (!settings.IsReady) {
                    initialized = false;
                    TranslatingMessageHandler.SendError("CriticalSettingsFailure");
                    return;
                }

                Core.locations.setup();

                settings.PropertyChanged += new PropertyChangedEventHandler(settings_PropertyChanged);

                monitor = new Monitor.Monitor();

                TranslatingProgressHandler.setTranslatedMessage("ValidatingBackupPath");
                if (settings.IsBackupPathSet && (!PermissionsHelper.isReadable(settings.backup_path) || !PermissionsHelper.isWritable(settings.backup_path)))
                    settings.clearBackupPath();

                if (!locations.ready)
                    return;

                //task = new Task.TaskHandler();

                initialized = true;
            }
            //ProgressHandler.progress_state = ProgressState.Normal;
        }
Exemple #2
0
        protected virtual void doWork(object sender, DoWorkEventArgs e) {
            ProgressHandler.state = ProgressState.Indeterminate;
            if (!initialized) {
                TranslatingProgressHandler.setTranslatedMessage("LoadingSettings");

                if (!settings.IsReady) {
                    initialized = false;
                    TranslatingMessageHandler.SendError("CriticalSettingsFailure");
                    return;
                }

                Core.locations.setup();

                settings.PropertyChanged += new PropertyChangedEventHandler(settings_PropertyChanged);

                monitor = new Monitor.Monitor();

                TranslatingProgressHandler.setTranslatedMessage("ValidatingBackupPath");
                if (settings.IsBackupPathSet && (!PermissionsHelper.isReadable(settings.backup_path) || !PermissionsHelper.isWritable(settings.backup_path)))
                    settings.clearBackupPath();

                if (!locations.ready)
                    return;

                //task = new Task.TaskHandler();

                initialized = true;
            }
            //ProgressHandler.progress_state = ProgressState.Normal;
        }