private void mnuCWX_Click(object sender, System.EventArgs e) { if (current_dsp_mode == DSPMode.LSB) CurrentDSPMode = DSPMode.CWL; else if (current_dsp_mode == DSPMode.USB) CurrentDSPMode = DSPMode.CWU; if (current_dsp_mode != DSPMode.CWL && current_dsp_mode != DSPMode.CWU) { MessageBox.Show("The radio must be in CWL or CWU mode in order to open the " + "CWX Control Form.", "CWX Error: Wrong Mode", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } // cw_key_mode = true; if (CWXForm == null || CWXForm.IsDisposed) { CWXForm = new CWX(this); CWXForm.StartPosition = FormStartPosition.Manual; CWXForm.RestoreSettings(); Win32.SetWindowPos(CWXForm.Handle.ToInt32(), -1, this.Left, this.Top, CWXForm.Width, CWXForm.Height, 0); } btnCWX1.Checked = false; btnCWX2.Checked = false; btnCWX3.Checked = false; btnCWX4.Checked = false; btnCWX5.Checked = false; btnCWX6.Checked = false; CWXForm.stopButton_Click(null, null); CWXForm.Show(); CWXForm.Focus(); CWXForm.setup_timer(); // kick timer! yt7pwr }
public void btnCWX6_Click(object sender, EventArgs e) { if (btnCWX6.Checked && !cwx_playing && !TUN) { CWX_Playing = true; btnCWX1.Checked = false; btnCWX2.Checked = false; btnCWX3.Checked = false; btnCWX4.Checked = false; btnCWX5.Checked = false; btnCWX1.BackColor = SystemColors.Control; btnCWX2.BackColor = SystemColors.Control; btnCWX3.BackColor = SystemColors.Control; btnCWX4.BackColor = SystemColors.Control; btnCWX5.BackColor = SystemColors.Control; btnCWX6.BackColor = button_selected_color; if (CWXForm == null || CWXForm.IsDisposed) { CWXForm = new CWX(this); CWXForm.StartPosition = FormStartPosition.Manual; CWXForm.RestoreSettings(); } else CWXForm.setup_timer(); // kick timer! CWXForm.s6_Click(sender, e); } else { CWX_Playing = false; if (CWXForm != null || !CWXForm.IsDisposed) { CWXForm.stopButton_Click(sender, e); } CWXForm.stopButton_Click(sender, e); btnCWX6.BackColor = SystemColors.Control; } }
private void udCWSpeed_ValueChanged(object sender, System.EventArgs e) { DttSP.SetKeyerSpeed((float)udCWSpeed.Value); ptbCWSpeed.Value = (int)udCWSpeed.Value; if ((current_model == Model.GENESIS_G59USB || current_model == Model.GENESIS_G11 || CurrentModel == Model.GENESIS_G59NET || current_model == Model.GENESIS_G6) && !booting) SetupForm.G59CWSpeed = (int)udCWSpeed.Value; if (CWXForm == null || CWXForm.IsDisposed) { CWXForm = new CWX(this); CWXForm.StartPosition = FormStartPosition.Manual; CWXForm.RestoreSettings(); } CWXForm.CWXWPM = (int)udCWSpeed.Value; if (EthCATIsActive) CAT_client_socket.ClientServerSync("ZZCS;"); // sync with server if (udCWSpeed.Focused) btnHidden.Focus(); }