private void testToolStripMenuItem_Click(object sender, EventArgs e) { if (conn.isPiMaker) { if (eepromSettings != null) { if (eepromSettings.Visible) { eepromSettings.BringToFront(); return; } else { eepromSettings.Dispose(); eepromSettings = null; } } if (eepromSettings == null) eepromSettings = new EEPROMPiMaker(); eepromSettings.Show2(); } if (conn.isMarlin) { if (eepromSettingsm != null) { if (eepromSettingsm.Visible) { eepromSettingsm.BringToFront(); return; } else { eepromSettingsm.Dispose(); eepromSettingsm = null; } } if (eepromSettingsm == null) eepromSettingsm = new EEPROMMarlin(); eepromSettingsm.Show2(); } }
private void OnPrinterConnectionChange(string msg) { toolConnection.Text = msg; sendScript1ToolStripMenuItem.Enabled = conn.connected; sendScript2ToolStripMenuItem.Enabled = conn.connected; sendScript3ToolStripMenuItem.Enabled = conn.connected; sendScript4ToolStripMenuItem.Enabled = conn.connected; sendScript5ToolStripMenuItem.Enabled = conn.connected; if (conn.connected) { toolConnect.Image = imageList.Images[0]; toolConnect.ToolTipText = Trans.T("L_DISCONNECT_PRINTER"); // "Disconnect printer"; toolConnect.Text = Trans.T("M_DISCONNECT"); // "Disconnect"; foreach (ToolStripItem it in toolConnect.DropDownItems) it.Enabled = false; //eeprom.Enabled = true; toolStripEmergencyButton.Enabled = true; } else { toolConnect.Image = imageList.Images[1]; toolConnect.ToolTipText = Trans.T("L_CONNECT_PRINTER"); // "Connect printer"; toolConnect.Text = Trans.T("M_CONNECT"); // "Connect"; eeprom.Enabled = false; continuousMonitoringMenuItem.Enabled = false; if (eepromSettings != null && eepromSettings.Visible) { eepromSettings.Close(); eepromSettings.Dispose(); eepromSettings = null; } if (eepromSettingsm != null && eepromSettingsm.Visible) { eepromSettingsm.Close(); eepromSettingsm.Dispose(); eepromSettingsm = null; } foreach (ToolStripItem it in toolConnect.DropDownItems) it.Enabled = true; toolStripEmergencyButton.Enabled = false; SDCard.Disconnected(); } }