示例#1
0
        private void configureCOMPortToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmComPort frmComPort = new frmComPort();

            frmComPort.ShowDialog();

            string selectedPort = frmComPort.selectedComPort;

            if (selectedPort != null)
            {
                port.ComName = selectedPort;

                //Save the ComName into application setting
                Properties.Settings set = Properties.Settings.Default;
                set.COMPort = selectedPort;
                set.Save();
            }
        }
示例#2
0
 private string LoadFromConfig()
 {
     Properties.Settings set = Properties.Settings.Default;
     return(set.COMPort);
 }
示例#3
0
 private string getComPort()
 {
     Properties.Settings set = Properties.Settings.Default;
     return(set.COMPort);
 }