private void RestartExpectedOutput() { if (IsClosing) { return; } FillExpectedLayoutWorker.CancelAsync(); while (FillExpectedLayoutWorker.IsBusy) { Thread.Sleep(500); Application.DoEvents(); } ConfigDetails configDetails = new ConfigDetails { DriveLetter = MountPoint.Text, VolumeLabel = VolumeLabel.Text, SourceLocations = new List <string>(mergeList.Nodes.Count) }; // if (mergeList.Nodes != null) // Apperently always true foreach (TreeNode node in mergeList.Nodes) { configDetails.SourceLocations.Add(node.Text); } FillExpectedLayoutWorker.RunWorkerAsync(configDetails); }
public void StartProcessing(List <string> pathsOfInterest) { waiting = new WaitCursor(this); oldTooltip = toolTip1.GetToolTip(this); toolTip1.SetToolTip(this, "Calculating..."); FillExpectedLayoutWorker.CancelAsync(); while (FillExpectedLayoutWorker.IsBusy) { Thread.Sleep(500); Application.DoEvents(); } Log.Info(string.Join(", ", pathsOfInterest)); FillExpectedLayoutWorker.RunWorkerAsync(pathsOfInterest); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { isClosing = true; FillExpectedLayoutWorker.CancelAsync(); }