Пример #1
0
 public static void executeCommand(enumDeviceCommand name, IPEndPoint ipEndPoint, int timeLater)
 {
     if (timeLater > 0)
     {
         Thread.Sleep(timeLater);
     }
     executeCommand(name, ipEndPoint);
 }
Пример #2
0
        public static IDeviceCommand getDeivceCommand(enumDeviceCommand name)
        {
            IDeviceCommand idc = DeviceCommandList.Find((cmd) =>
            {
                return(cmd.Name == name.ToString());
            });

            return(idc);
        }
Пример #3
0
        public static void executeCommand(enumDeviceCommand name, IPEndPoint ipEndPoint)
        {
            IDeviceCommand cmd = null;

            cmd = getDeivceCommand(name);
            if (cmd != null)
            {
                cmd.sendCommand(ipEndPoint);
            }
        }
Пример #4
0
        public static void setCommandCallback(enumDeviceCommand name, Action <string> _callback)
        {
            IDeviceCommand cmd = null;

            cmd = getDeivceCommand(name);
            if (cmd != null)
            {
                cmd.Callback = _callback;
            }
        }
Пример #5
0
 public static void setCommandCallback(enumDeviceCommand name, Action<string> _callback)
 {
     IDeviceCommand cmd = null;
     cmd = getDeivceCommand(name);
     if (cmd != null)
     {
         cmd.Callback = _callback;
     }
 }
Пример #6
0
 public static IDeviceCommand getDeivceCommand(enumDeviceCommand name)
 {
     IDeviceCommand idc = DeviceCommandList.Find((cmd) =>
     {
         return cmd.Name == name.ToString();
     });
     return idc;
 }
Пример #7
0
 public static void executeCommand(enumDeviceCommand name, IPEndPoint ipEndPoint)
 {
     IDeviceCommand cmd = null;
     cmd = getDeivceCommand(name);
     if (cmd != null)
     {
         cmd.sendCommand(ipEndPoint);
     }
 }
Пример #8
0
 public static void executeCommand(enumDeviceCommand name, IPEndPoint ipEndPoint, int timeLater)
 {
     if (timeLater > 0)
     {
         Thread.Sleep(timeLater);
     }
     executeCommand(name, ipEndPoint);
 }