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(); } }
private string LoadFromConfig() { Properties.Settings set = Properties.Settings.Default; return(set.COMPort); }
private string getComPort() { Properties.Settings set = Properties.Settings.Default; return(set.COMPort); }