private void AIS测试控制_Click(object sender, EventArgs e) { Form1.AISRevString = string.Empty; Form1.AISchannel = string.Empty; Form1.AISRecvNum = 0; Form1.AISErrorNum = 0; Form1.AISRecvBit = 0; Form1.AISErrorBit = 0; Form1.AISErrorRate = 0; Form1.AISErrorBitRate = 0; if (AIS测试控制.Text == "开始测试") { AIS测试控制.Text = "正在测试"; TimerRefresh.Start(); Form1.AISString = AISRewData.Text.Trim(); Form1.isStart_AIS = true; Form1.savetxt1.Name = "AIS"; Form1.savetxt1.Start(); } else if (AIS测试控制.Text == "正在测试") { AIS测试控制.Text = "开始测试"; TimerRefresh.Stop(); Form1.isStart_AIS = false; Form1.savetxt1.Stop(); } }
private void ACARS测试控制_Click(object sender, EventArgs e) { Form1.ACARSRevString = string.Empty; Form1.ACARSchannel = string.Empty; Form1.ACARSRecvNum = 0; Form1.ACARSErrorNum = 0; Form1.ACARSRecvBit = 0; Form1.ACARSErrorBit = 0; Form1.ACARSErrorRate = 0; Form1.ACARSErrorBitRate = 0; if (ACARS测试控制.Text == "开始测试") { Form1.isStart_ACARS = true; Form1.savetxt2.Name = "ACARS"; Form1.savetxt2.Start(); ACARS测试控制.Text = "正在测试"; TimerRefresh.Start(); } else if (ACARS测试控制.Text == "正在测试") { Form1.isStart_ACARS = false; Form1.savetxt2.Stop(); ACARS测试控制.Text = "开始测试"; TimerRefresh.Stop(); } }
private void RequestRefresh() { TimerRefresh.Stop(); QueryBalance(); QueryIncomingTransfers(); TimerRefresh.StartOnce(TimerSettings.AccountRefreshPeriod); }
private void TimerRefresh_Tick(object sender, EventArgs e) { if (angle != 90) { if (angle > 180) { equalizer.down_coeff += 0.1; } if (angle < 180) { equalizer.up_coeff -= 0.05; } equalizer.CalckChange(ref angle, ref speed); AngleTb.Text += string.Format("{0} \n", angle) + Environment.NewLine; SpeedTB.Text += string.Format("{0} \n", speed) + Environment.NewLine; AngSpeedTb.Text += string.Format("{0} \n", speed) + Environment.NewLine; tick++; AngleForm.MakeGr(tick, angle); SpeedForm.MakeGr(tick, speed); } else { TimerRefresh.Stop(); MessageBox.Show("Установка маятника завершена", "Завершение работы", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void BtnClr_Click(object sender, EventArgs e) { speed = 0; angle = 270; tick = 0; equalizer.down_coeff = 1; equalizer.up_coeff = 1; TimerRefresh.Stop(); AngleForm.Close(); SpeedForm.Close(); AngleTb.Text = ""; SpeedTB.Text = ""; AngSpeedTb.Text = ""; AngleForm = new AngleGrForm(); SpeedForm = new SpeedGrForm(); }
private void BtnStop_Click(object sender, EventArgs e) { TimerRefresh.Stop(); }