public static void perform(operation_d operation) { using (UnshownBusyDlg f = new UnshownBusyDlg(operation)) { f.ShowDialog(); } }
public void add(operation_d operation) { lock (SYNCROOT) { _operations.enqueue(operation); } _evCatnap.set(); }
private void callOperation(operation_d operation) { _retry = false; operation(); if (_retry) { _topPrioOperations.Enqueue(operation); } }
public static void perform(operation_d operation, IWin32Window owner = null, bool forceNoDlg = false) { if (performing || forceNoDlg) { operation(); } else { using (BusyDlg f = new BusyDlg(operation)) { performing = true; f.ShowDialog(owner); performing = false; if (f._e != null) { throw new ExceptionCarrier(f._e); } } } }
public BusyDlg(operation_d operation, bool cancellable) { self = this; _operation = operation; InitializeComponent(); if (cancellable == false) { this.btnCancel.Visible = false; this.Height = 110; } this.MinimumSize = this.Size; this.MaximumSize = new Size(this.Size.Width * 2, this.Size.Height); this.lblStatus.Text = ""; this.lblOptStatus.Text = ""; Gnd.i.progressMessage.post(null); Gnd.i.progressOptionalMessage.post(null); }
public static void perform(bool antiCancel, operation_d operation) { using (CancellableBusyDlg f = new CancellableBusyDlg(operation)) { Gnd.i.cancellableBusyDlg = f; Gnd.i.cancelled = false; if (antiCancel) { f.btnCancel.Enabled = false; } f.ShowDialog(); Gnd.i.cancellableBusyDlg = null; if (f._e != null) { throw f._e; } } GC.Collect(); }
public UnshownBusyDlg(operation_d operation) { _operation = operation; InitializeComponent(); }
public CancellableBusyDlg(operation_d operation) { _operation = operation; InitializeComponent(); }
public void add(operation_d operation) { _operations.Enqueue(operation); }
public void addTopPrio(operation_d operation) { _topPrioOperations.Enqueue(operation); }