Made all the GetPortNames go through FrostedSerialPort
Cleaned up some using statements.
This commit is contained in:
parent
30fbe6d855
commit
73db6d8db9
5 changed files with 13 additions and 43 deletions
|
|
@ -28,26 +28,15 @@ either expressed or implied, of the FreeBSD Project.
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO.Ports;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.MatterControl.ContactForm;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.MatterControl.ConfigurationPage.PrintLeveling;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.SerialPortCommunication.FrostedSerial;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -368,7 +357,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
string query = string.Format("SELECT * FROM Printer;");
|
||||
IEnumerable<Printer> printer_profiles = (IEnumerable<Printer>)Datastore.Instance.dbSQLite.Query<Printer>(query);
|
||||
string[] comportNames = SerialPort.GetPortNames();
|
||||
string[] comportNames = FrostedSerialPort.GetPortNames();
|
||||
|
||||
foreach (DataStorage.Printer printer in printer_profiles)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
|
@ -1300,7 +1299,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
{
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
// Allow the user to set the appropriate properties.
|
||||
var portNames = SerialPort.GetPortNames();
|
||||
var portNames = FrostedSerialPort.GetPortNames();
|
||||
//Debug.WriteLine("Open ports: {0}".FormatWith(portNames.Length));
|
||||
if (portNames.Length > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO.Ports;
|
||||
using System.Diagnostics;
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.OpenGlGui;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.RenderOpenGl;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO.Ports;
|
||||
using System.Diagnostics;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.OpenGlGui;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.RenderOpenGl;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue