예제 #1
0
 protected override void OnClosing(CancelEventArgs e)
 {
     if (Tuner != null)
     {
         Tuner.CloseTuner();
         Tuner = null;
     }
     SetConnected(false);
     base.OnClosing(e);
 }
예제 #2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            if (Tuner != null)
            {
                SetConnected(false);
                Tuner.CloseTuner();
                Tuner = null;
            }
            else
            {
                Tuner = new AR5000(true);

                if (!Tuner.OpenTuner())
                {
                    SetConnected(false);
                    Tuner = null;
                    return;
                }
                SetConnected(true);
            }
        }