Converted as much ugly code as I could find into appropriate C#-friendly versions. For example, all the manual ByteHelper stuff, buffer index tracking, etc. are now BinaryWriters/BinaryReaders. Also cleaned up a bunch of getter and setter methods to use C# properties. There's still more to be done here, but this greatly simplifies the code for reading and comprehension.
28 lines
585 B
C#
28 lines
585 B
C#
namespace ScreenLogicConnect.Messages
|
|
{
|
|
public class GetMode : HLMessage
|
|
{
|
|
public const short HLM_MODE_GETMODEQ = 110;
|
|
|
|
public static GetMode QUERY(short senderID)
|
|
{
|
|
return new GetMode(senderID, (short)HLM_MODE_GETMODEQ);
|
|
}
|
|
|
|
private GetMode(short senderID, short msgID)
|
|
: base(senderID, msgID)
|
|
{
|
|
}
|
|
|
|
public GetMode(byte[] header, byte[] data)
|
|
: base(header, data)
|
|
{
|
|
}
|
|
|
|
public GetMode(HLMessage msg)
|
|
: base(msg)
|
|
{
|
|
}
|
|
}
|
|
}
|