private void btnStart_Click(object sender, EventArgs e) { try { root = ApplicationRoot.Singleton; root.CoreLoaded += Root_CoreLoaded; new MainFactory().Make(root, txtToolModel.Text, true); btnStart.Enabled = false; btnStart2.Enabled = false; } catch (Exception ex) { Console.WriteLine("Failed to Start - {0}", ex); if (root != null) { root.CoreLoaded -= Root_CoreLoaded; } ApplicationRoot.Reset(); } }
private void btnStart2_Click(object sender, EventArgs e) { try { root = ApplicationRoot.Singleton; root.CoreLoaded += Root_CoreLoaded; new MainFactory().Make(root, @"C:\Personal\Projects\EIB\HellerEIB\HellerEIB_TEST.xml", true); ecsServerNameTextBox.Text = "ECSInterface_Oven"; btnStart.Enabled = false; btnStart2.Enabled = false; } catch (Exception ex) { Console.WriteLine("Failed to Start - {0}", ex); if (root != null) { root.CoreLoaded -= Root_CoreLoaded; } ApplicationRoot.Reset(); } }