예제 #1
0
파일: Main.cs 프로젝트: ptaa32/ARDOP
        private void InitializeFromIni()
        {
            objIniFile.Load();

            MCB.Callsign = objIniFile.GetString("ARDOP_Win TNC", "Callsign", "");
            MCB.StartMinimized = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "StartMinimized", "False"));
            MCB.DebugLog = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "DebugLog", "True"));
            MCB.CommandTrace = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "CommandTrace", "False"));
            MCB.CaptureDevice = objIniFile.GetString("ARDOP_Win TNC", "CaptureDevice", "");
            MCB.PlaybackDevice = objIniFile.GetString("ARDOP_Win TNC", "PlaybackDevice", "");
            MCB.LeaderLength = objIniFile.GetInteger("ARDOP_Win TNC", "LeaderLength", 120);
            MCB.TrailerLength = objIniFile.GetInteger("ARDOP_Win TNC", "TrailerLength", 0);
            MCB.ARQBandwidth = objIniFile.GetString("ARDOP_Win TNC", "ARQBandwidth", "500Max");
            MCB.Mode_Radio = objIniFile.GetString("ARDOP_Win TNC", "Mode_Radio", "HF SSB");
            MCB.DriveLevel = objIniFile.GetInteger("ARDOP_Win TNC", "DriveLevel", 90);
            MCB.Squelch = objIniFile.GetInteger("ARDOP_Win TNC", "Squelch", 5);
            MCB.AccumulateStats = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "Accum Stats", "True"));
            MCB.DisplayWaterfall = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "Display Waterfall", "True"));
            MCB.DisplaySpectrum = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "Display Spectrum", "False"));
            MCB.SecureHostLogin = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "SecureHostLogin", "False"));
            MCB.Password = objIniFile.GetString("ARDOP_Win TNC", "LoginPassword", "");
            MCB.TuningRange = objIniFile.GetInteger("ARDOP_Win TNC", "TuningRange", 100);
            MCB.RadioControl = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "Enable Radio Control", "False"));
            MCB.FECRepeats = objIniFile.GetInteger("ARDOP_Win TNC", "FECRepeats", 2);
            MCB.FECMode = objIniFile.GetString("ARDOP_Win TNC", "FECMode", "4PSK.500.100");
            MCB.FECId = Convert.ToBoolean(objIniFile.GetString("ARDOP_Win TNC", "FECId", "True"));
            ToolStripMenuItem1.Enabled = MCB.RadioControl;

            if (MCB.RadioControl)
            {
                if ((objRadio == null))
                {
                    objRadio = new Radio();
                    objRadio.OpenControlPort();
                    objRadio.OpenPttPort();
                }
            }
        }
예제 #2
0
파일: Main.cs 프로젝트: ptaa32/ARDOP
 private void ToolStripMenuItem1_Click(System.Object sender, System.EventArgs e)
 {
     if ((objRadio == null))
         objRadio = new Radio();
     objRadio.ShowDialog();
     if (objRadio.DialogResult == Windows.Forms.DialogResult.OK)
     {
         objRadio.CloseRadio();
         objRadio.Close();
         objRadio = null;
         if (MCB.RadioControl)
         {
             objRadio = new Radio();
             objRadio.OpenControlPort();
             objRadio.OpenPttPort();
         }
     }
 }