private void ShowNewForm(object sender, EventArgs e) { UT60EConfigWizard config = new UT60EConfigWizard(); var result = config.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { UT60EDisplayForm childForm = new UT60EDisplayForm(); UT60EMainController controller = new UT60EMainController(childForm, config.port_settings, config.log ? config.log_setting : null); childForm.Connect(controller); childForm.MdiParent = this; childForm.Show(); } }
public void Disconnect(UT60EMainController controller) { controller.LoggingStarted -= this.OnLoggingStarted; controller.LoggingStopped -= this.OnLoggingStopped; this.controller = null; }
public void Connect(UT60EMainController controller) { this.controller = controller; controller.LoggingStarted += this.OnLoggingStarted; controller.LoggingStopped += this.OnLoggingStopped; }