Made all the GetPortNames go through FrostedSerialPort

Cleaned up some using statements.
This commit is contained in:
larsbrubaker 2014-06-27 10:57:14 -07:00
parent 30fbe6d855
commit 73db6d8db9
5 changed files with 13 additions and 43 deletions

View file

@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO.Ports;
using MatterHackers.Agg;
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.DataStorage;
using MatterHackers.MatterControl.PrinterCommunication;
using MatterHackers.SerialPortCommunication.FrostedSerial;
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
{
@ -63,7 +63,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
this.ActivePrinter.BaudRate = "250000";
try
{
this.ActivePrinter.ComPort = SerialPort.GetPortNames()[0];
this.ActivePrinter.ComPort = FrostedSerialPort.GetPortNames()[0];
}
catch
{
@ -83,7 +83,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
{
try
{
this.ActivePrinter.ComPort = SerialPort.GetPortNames()[0];
this.ActivePrinter.ComPort = FrostedSerialPort.GetPortNames()[0];
}
catch
{
@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
int portIndex = 0;
foreach (string serialPort in SerialPort.GetPortNames())
foreach (string serialPort in FrostedSerialPort.GetPortNames())
{
//Filter com port list based on usb type (applies to Mac mostly)
bool looks_like_mac = serialPort.StartsWith("/dev/tty.");
@ -156,7 +156,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
if (portIndex == 0)
{
foreach (string serialPort in SerialPort.GetPortNames())
foreach (string serialPort in FrostedSerialPort.GetPortNames())
{
SerialPortIndexRadioButton comPortOption = createComPortOption(serialPort);
comPortContainer.AddChild(comPortOption);