/// <summary> /// Show the task user interface /// </summary> /// <param name="Owner"></param> /// <returns>whether to cancel the task, or run now</returns> public override ShowResult Show(System.Windows.Forms.IWin32Window Owner) { RunningTotalsTaskForm dlg = new RunningTotalsTaskForm(this.Consumer); dlg.Icon = new Icon(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(this.IconName)); dlg.Text = this.Label; dlg.Settings = settings; if (System.Windows.Forms.DialogResult.OK == dlg.ShowDialog(Owner)) { // gather settings values from the dialog settings = dlg.Settings; return(ShowResult.RunNow); } else { return(ShowResult.Canceled); } }
public override void RestoreStateFromXml(string xmlState) { settings = new RunningTotalsTaskSettings(); settings.FromXml(xmlState); }
public override bool Initialize() { settings = new RunningTotalsTaskSettings(); return true; }
/// <summary> /// Show the task user interface /// </summary> /// <param name="Owner"></param> /// <returns>whether to cancel the task, or run now</returns> public override ShowResult Show(System.Windows.Forms.IWin32Window Owner) { RunningTotalsTaskForm dlg = new RunningTotalsTaskForm(this.Consumer); dlg.Icon = new Icon(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(this.IconName)); dlg.Text = this.Label; dlg.Settings = settings; if (System.Windows.Forms.DialogResult.OK == dlg.ShowDialog(Owner)) { // gather settings values from the dialog settings = dlg.Settings; return ShowResult.RunNow; } else return ShowResult.Canceled; }
public override bool Initialize() { settings = new RunningTotalsTaskSettings(); return(true); }