Exemplo n.º 1
0
 private void startBackup(RunWorkerCompletedEventHandler when_done)
 {
     ProgressHandler.saveMessage();
     backup.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backup_RunWorkerCompleted);
     disableInterface(backup.worker);
     backup.RunWorkerAsync();
 }
Exemplo n.º 2
0
        public void startMonitoring(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            if (monitors.Count > 0)
            {
                stopMonitoring();
            }

            if (!IsMonitored)
            {
                return;
            }


            if (!CheckBackuptPathForMonitor())
            {
                return;
            }

            TranslatingProgressHandler.setTranslatedMessage("BackupUpForMonitor", this.Title);

            ProgressHandler.suppress_communication = true;

            BackupProgramHandler backup = new BackupProgramHandler(this, null, null, Core.locations);

            backup.RunWorkerAsync();
            while (backup.IsBusy)
            {
                Thread.Sleep(100);
            }


            TranslatingProgressHandler.setTranslatedMessage("SettingUpMonitorFor", this.Title);

            ProgressHandler.suppress_communication = false;


            foreach (DetectedLocationPathHolder path in this.DetectedLocations.Values)
            {
                MonitorPath mon = new MonitorPath(this, path);
                monitors.Push(mon);
                mon.start();
            }
        }