Code inspections
This commit is contained in:
@@ -576,7 +576,7 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
CheckConnectedAndValidateSite(site, "SetSiteName");
|
CheckConnectedAndValidateSite(site, "SetSiteName");
|
||||||
|
|
||||||
string command = String.Empty;
|
string command;
|
||||||
switch (site)
|
switch (site)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.ComponentModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ASCOM.Meade.net.Properties;
|
using ASCOM.Meade.net.Properties;
|
||||||
@@ -54,8 +55,9 @@ namespace ASCOM.Meade.net
|
|||||||
chkTrace.Checked = profileProperties.TraceLogger;
|
chkTrace.Checked = profileProperties.TraceLogger;
|
||||||
// set the list of com ports to those that are currently available
|
// set the list of com ports to those that are currently available
|
||||||
comboBoxComPort.Items.Clear();
|
comboBoxComPort.Items.Clear();
|
||||||
comboBoxComPort.Items.AddRange(SerialPort
|
var portNames = SerialPort.GetPortNames().ToArray();
|
||||||
.GetPortNames()); // use System.IO because it's static
|
|
||||||
|
comboBoxComPort.Items.AddRange(portNames); // use System.IO because it's static
|
||||||
// select the current port if possible
|
// select the current port if possible
|
||||||
if (comboBoxComPort.Items.Contains(profileProperties.ComPort))
|
if (comboBoxComPort.Items.Contains(profileProperties.ComPort))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user