Example #1
0
        private void GetStatus18(object state)
        {
            string ip = "192.168.17.18";

#if DEBUG
            ip = "localhost/monitoring/17.18";
#endif

            DeviceStatusCache result = null;

            try
            {
                result = channel.GetDeviceStatusHistoryLastValue(ip);
            }
            catch (System.Exception ex)
            {
                logger.LogException(LogLevel.Info, "MainWindow.GetStatus18", ex);
                return;
            }

            if (result == null)
            {
                return;
            }

            Dispatcher.BeginInvoke(new Action(() => GetStatusUI(result, ref Led18)));
        }