Move MatterControl source code into a subdirectory
This commit is contained in:
parent
2c6e34243a
commit
70af2d9ae8
2007 changed files with 13 additions and 8 deletions
|
|
@ -0,0 +1,24 @@
|
|||
using System.Net;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.SerialPortCommunication.FrostedSerial;
|
||||
|
||||
namespace TcpipDriver
|
||||
{
|
||||
public class TcpipSerialPortFactory : FrostedSerialPortFactory
|
||||
{
|
||||
public override bool SerialPortAlreadyOpen(string portName) => false;
|
||||
|
||||
protected override string GetDriverType() => "TCPIP";
|
||||
|
||||
public override IFrostedSerialPort Create(string serialPortName, PrinterSettings settings)
|
||||
{
|
||||
return new TcpipSerialPort(settings, serialPortName);
|
||||
}
|
||||
|
||||
public override bool SerialPortIsAvailable(string serialPortName, PrinterSettings settings)
|
||||
{
|
||||
return int.TryParse(settings.GetValue(SettingsKey.ip_port), out _)
|
||||
&& IPAddress.TryParse(settings.GetValue(SettingsKey.ip_address), out _);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue