/// <summary> /// Implementation of the method resposible for displaying the form. /// This one is abstract in the base class. /// </summary> /// <param name="parentControl">The owner window</param> /// <returns>true when the form is shown ok</returns> protected override bool EditImpl(IWin32Window parentControl) { using (MultipleHashForm form = new MultipleHashForm()) { this.HookupEvents(form); if (form.ShowDialog(parentControl) == DialogResult.OK) { return(true); } else { return(false); } } }
/// <summary> /// Communication with UI form goes through these events. The UI will raise events when some data/action /// is needed and this class is responsible to answer those requests. This way we create separation between UI /// specific logic and interactions with SSIS data flow object model. /// There are 7 required events: /// GetInputColumns - Retrieves all the input columns from the SSIS data flow object /// SetInputColumn - Passes alterations to input columns back to the SSIS data flow object /// DeleteInputColumn - Removes an input column from the SSIS data flow object /// GetOutputColumns - Retreives all the output columns from the SSIS data flow object /// AddOutputColumn - Adds a new output column to the SSIS data flow object /// AlterOutputColumn - Passes alterations to an output column back to the SSIS data flow object /// DeleteOutputColumn - Removes an output column from the SSIS data flow object /// </summary> /// <param name="form">The form that called this</param> private void HookupEvents(MultipleHashForm form) { form.GetInputColumns += new GetInputColumnsEventHandler(this.form_GetInputColumns); form.SetInputColumn += new ChangeInputColumnEventHandler(this.form_SetInputColumn); form.DeleteInputColumn += new ChangeInputColumnEventHandler(this.form_DeleteInputColumn); form.GetOutputColumns += new GetOutputColumnsEventHandler(this.form_GetOutputColumns); form.AddOutputColumn += new AddOutputColumnEventHandler(this.form_AddOutputColumn); form.AlterOutputColumn += new AlterOutputColumnEventHandler(this.form_AlterOutputColumn); form.DeleteOutputColumn += new DeleteOutputColumnEventHandler(this.form_DeleteOutputColumn); form.CallErrorHandler += new ErrorEventHandler(this.form_CallErrorHandler); form.GetThreadingDetail += new GetThreadingDetailEventHandler(this.form_GetThreadingDetail); form.SetThreadingDetail += new SetThreadingDetailEventHandler(this.form_SetThreadingDetail); form.GetSafeNullHandlingDetail += new GetSafeNullDetailsEventHandler(this.form_GetSafeNullDetail); form.SetSafeNullHandlingDetail += new SetSafeNullDetailsEventHandler(this.form_SetSafeNullDetail); form.GetMillisecondHandlingDetail += new GetMillisecondHandlingDetailEventHandler(this.form_GetMillisecondDetail); form.SetMillisecondHandlingDetail += new SetMillisecondHandlingDetailEventHandler(this.form_SetMillisecondDetail); }