コード例 #1
0
        public void ShowMsg(string text, bool sound)
        {
            if (sound)
            {
                if (text.Contains("Not ready") && wsjtxClient.myCall == "K0LW")
                {
                    wsjtxClient.Play("dive.wav");
                    text = "Not yet, Lee!";
                }
                else
                {
                    SystemSounds.Beep.Play();
                }
            }



            if (errDlg != null)
            {
                errDlg.Close();
                errDlg = null;
                timer3.Stop();
            }
            errDlg = new ErrorDlg();
            Point p = Location;
            int   w = (Width - errDlg.Width) / 2;

            p.Offset(w, 144);
            errDlg.Location     = p;
            errDlg.textBox.Text = text;
            errDlg.Show();
            timer3.Start();
        }
コード例 #2
0
 private void timer3_Tick(object sender, EventArgs e)
 {
     timer3.Stop();
     if (errDlg != null)
     {
         errDlg.Close();
         errDlg = null;
     }
 }