public void stopMonitoring() { while (monitors.Count > 0) { MonitorPath path = monitors.Pop(); path.stop(); path.Dispose(); } }
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(); } }
public MonitorPathCommand(Monitor monitor, MonitorPath path) : base(monitor, "path", "allows modification of internal 'PATH' variable.") { monitorPath = path; }