private void UpdateLostObjects() { Cursor.Current = Cursors.WaitCursor; var dialogResult = FormProcess.ReadDialog(this, "fsck-objects" + GetOptions()); if (FormProcess.IsOperationAborted(dialogResult)) { DialogResult = DialogResult.Abort; return; } lostObjects.Clear(); lostObjects.AddRange(dialogResult .Split('\r', '\n') .Where(s => !string.IsNullOrEmpty(s)) .Select <string, LostObject>((s) => LostObject.TryParse(Module, s)) .Where(parsedLostObject => parsedLostObject != null)); UpdateFilteredLostObjects(); Cursor.Current = Cursors.Default; }
private void UpdateLostObjects() { using (WaitCursorScope.Enter()) { string cmdOutput = FormProcess.ReadDialog(this, process: null, arguments: $"fsck-objects{GetOptions()}", Module.WorkingDir, input: null, useDialogSettings: true); if (FormProcess.IsOperationAborted(cmdOutput)) { DialogResult = DialogResult.Abort; return; } _lostObjects.Clear(); _lostObjects.AddRange( cmdOutput .Split('\r', '\n') .Where(s => !string.IsNullOrEmpty(s)) .Select((s) => LostObject.TryParse(Module, s)) .Where(parsedLostObject => parsedLostObject is not null) .OrderByDescending(l => l.Date)); UpdateFilteredLostObjects(); } }
private void UpdateLostObjects() { using (WaitCursorScope.Enter()) { var dialogResult = FormProcess.ReadDialog(this, "fsck-objects" + GetOptions()); if (FormProcess.IsOperationAborted(dialogResult)) { DialogResult = DialogResult.Abort; return; } _lostObjects.Clear(); _lostObjects.AddRange( dialogResult .Split('\r', '\n') .Where(s => !string.IsNullOrEmpty(s)) .Select((s) => LostObject.TryParse(Module, s)) .Where(parsedLostObject => parsedLostObject != null)); UpdateFilteredLostObjects(); } }