void importer_OnMissing(MissingEventArgs args) { MissingPortionsDialog dialog = new MissingPortionsDialog(args.ExistingPortions, args.MissingPortions, args.MillName); dialog.ShowDialog(); if (dialog.DialogResult != System.Windows.Forms.DialogResult.No) { importer.TaskIsCancelled = true; } }
public IConnection Get(IEndPoint computer) { var conn = GetInternal(computer); if (conn != null) return conn; var added = new MissingEventArgs{EndPoint = computer}; ConnectionNotFound.FireEvent(this, added); if (added.Added) return GetInternal(computer); return conn; }
void importer_OnMissing(MissingEventArgs args) { if (this.InvokeRequired) { this.Invoke(new Action(() => { MissingPortionsDialogCreation(args); })); } else { MissingPortionsDialogCreation(args); } }