/// <summary> /// Show a form to fetch edges for hosted-sweep creation, and then create /// the hosted-sweep. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonCreate_Click(object sender, EventArgs e) { HostedSweepCreator creator = comboBoxHostedSweepType.SelectedItem as HostedSweepCreator; CreationData creationData = new CreationData(creator); using (EdgeFetchForm createForm = new EdgeFetchForm(creationData)) { if (createForm.ShowDialog() == DialogResult.OK) { creator.Create(creationData); RefreshListBox(); } } }
/// <summary> /// Show a form to add or remove edges from hosted sweep, and also can change the /// type of hosted sweep. /// </summary> /// <param name="context"></param> /// <param name="provider"></param> /// <param name="value"></param> /// <returns></returns> public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService winSrv = (IWindowsFormsEditorService)provider. GetService(typeof(IWindowsFormsEditorService)); CreationData creationData = value as CreationData; creationData.BackUp(); using (EdgeFetchForm form = new EdgeFetchForm(creationData)) { if (winSrv.ShowDialog(form) == System.Windows.Forms.DialogResult.OK) creationData.Update(); else creationData.Restore(); } return creationData; }
/// <summary> /// Show a form to add or remove edges from hosted sweep, and also can change the /// type of hosted sweep. /// </summary> /// <param name="context"></param> /// <param name="provider"></param> /// <param name="value"></param> /// <returns></returns> public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService winSrv = (IWindowsFormsEditorService)provider. GetService(typeof(IWindowsFormsEditorService)); CreationData creationData = value as CreationData; creationData.BackUp(); using (EdgeFetchForm form = new EdgeFetchForm(creationData)) { if (winSrv.ShowDialog(form) == System.Windows.Forms.DialogResult.OK) { creationData.Update(); } else { creationData.Restore(); } } return(creationData); }
/// <summary> /// Show a form to fetch edges for hosted-sweep creation, and then create /// the hosted-sweep. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonCreate_Click(object sender, EventArgs e) { HostedSweepCreator creator = comboBoxHostedSweepType.SelectedItem as HostedSweepCreator; CreationData creationData = new CreationData(creator); using (EdgeFetchForm createForm = new EdgeFetchForm(creationData)) { if (createForm.ShowDialog() == DialogResult.OK) { creator.Create(creationData); RefreshListBox(); } } }