Пример #1
0
        public void SendDebugMessage(string msg, DebugMessageLevel level = DebugMessageLevel.Info)
        {
            if (string.IsNullOrEmpty(msg))
            {
                return;
            }

            SendDebug(new List <DebugMessage> {
                DebugMessage.Instance(msg, level)
            });
        }
        private void __switchOffSteckdosen()
        {
            var states = new JObject
            {
                ["in1"] = false,
                ["in2"] = false,
                ["in3"] = false,
                ["in4"] = false
            };

            var r = RelayCommandWebsocket.Send(TargetUriSteckdosen, states.ToString(Formatting.None));

            if (!r.Result)
            {
                SendDebug(DebugMessage.Instance($"{r.LastError}", DebugMessageLevel.Error));
            }
        }
        private void __resetRgbLight()
        {
            var states = new JObject
            {
                ["r"] = 255,
                ["g"] = 255,
                ["b"] = 255,
                ["w"] = 1023
            };

            var r = RelayCommandWebsocket.Send(TargetUriRgbStripes, states.ToString(Formatting.None));

            if (!r.Result)
            {
                SendDebug(DebugMessage.Instance($"{r.LastError}", DebugMessageLevel.Error));
            }
        }
Пример #4
0
 private void InitializerOnProgress(object sender, InitializeSystemState state)
 {
     SendDebug(new List <DebugMessage> {
         DebugMessage.Instance(state.Message)
     });
 }
Пример #5
0
 private void AnalyzerOnProgress(object sender, RouteAnalyzerState state)
 {
     SendDebug(new List <DebugMessage> {
         DebugMessage.Instance(state.Message)
     });
 }