/// <summary> /// Stops the EMR module. You could call dispose() in case you have resources to free.</summary> /// <remarks>required</remarks> public override void Close() { if (_benchForm != null) { if (_benchForm.InvokeRequired) { _benchForm.Invoke(new Action(Close)); return; } _benchForm.Close(); } base.Close(); _benchForm = null; }
/// <summary> /// Initialization and starting EMR Module</summary> /// <param name="configValues">saved configuration values, <see cref="UserControlEmrConfig"/></param> /// <returns>true if successfull</returns> /// <remarks>required</remarks> public override bool Initialize(Dictionary <string, string> configValues) { //load saved configuration values base.Initialize(configValues); #region - show the TestBencForm - _benchForm = new TestBenchForm(this); //example to show show the test bench during the initialization of the EMR Plug-In only (before EasyWarePro is fully shown) //_benchForm.ShowDialog(); //==> you need to add a Close button to the TestBenchForm!! //show form in parallel to EasyWarePro _benchForm.Show(); ////example how to bring the form to front (after EasyWarePro started up) //System.Threading.Tasks.Task delayedTask = new System.Threading.Tasks.Task(() => { System.Threading.Thread.Sleep(1500); _benchForm.BringToFront(); }); //delayedTask.Start(); #endregion return(true); }