This repository has been archived by the owner on Jan 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added icons. Updated DmxDevice classes. Adjusted Tab's. Moved files. Added JSON file to define devices outside of the program. Finished the "Add Device" window. And more...
- Loading branch information
Showing
53 changed files
with
11,698 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
using DMX.Entities.Enumerations; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace DMX | ||
{ | ||
public abstract class DmxDevice | ||
public class DmxDevice | ||
{ | ||
public DmxDevice(string name, int startAddress, DmxDeviceTypes deviceType, byte[] channels) | ||
public DmxDevice(string name, int startAddress, DmxDeviceTypes deviceType, int numberOfChannels) | ||
{ | ||
Name = name; | ||
StartAddress = startAddress; | ||
DeviceType = deviceType; | ||
Channels = channels; | ||
Channels = new byte[numberOfChannels]; | ||
} | ||
|
||
public DmxDevice(JsonDmxDeviceObject jsonDmxDeviceObject) | ||
{ | ||
Name = jsonDmxDeviceObject.Name; | ||
StartAddress = jsonDmxDeviceObject.StartAddress; | ||
DeviceType = Enum.IsDefined(typeof(DmxDeviceTypes), jsonDmxDeviceObject.DeviceType) ? (DmxDeviceTypes)jsonDmxDeviceObject.DeviceType : DmxDeviceTypes.Unknown; | ||
Channels = new byte[jsonDmxDeviceObject.NumberOfChannels]; | ||
} | ||
|
||
private readonly string name; | ||
public string Name { get; } | ||
public virtual string Name { get; } | ||
|
||
private readonly int startAddress; | ||
public int StartAddress { get; } | ||
public virtual int StartAddress { get; } | ||
|
||
private readonly DmxDeviceTypes deviceType; | ||
public DmxDeviceTypes DeviceType { get; } | ||
public virtual DmxDeviceTypes DeviceType { get; } | ||
|
||
private byte[] channels; | ||
public byte[] Channels { get; private set; } | ||
private readonly byte[] channels; | ||
public virtual byte[] Channels { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace DMX | ||
{ | ||
public class JsonDmxDeviceObject | ||
{ | ||
public JsonDmxDeviceObject() | ||
{ } | ||
|
||
private string name; | ||
public string Name { get; set; } | ||
|
||
private int startAddress; | ||
public int StartAddress { get; set; } | ||
|
||
private int deviceType; | ||
public int DeviceType { get; set; } | ||
|
||
private int numberOfChannels; | ||
public int NumberOfChannels { get; set; } | ||
} | ||
} |
Oops, something went wrong.