public void UpdateData(Data.StatusInfo info)
        {
            if (info != null)
            {
                if (!string.IsNullOrEmpty(info.DeviceStatus))
                {
                    switch (info.DeviceStatus.ToLower())
                    {
                    case "active": StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "StatusGreen"); break;

                    case "idle": StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "StatusOrange"); break;

                    case "alert": StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "StatusRed"); break;

                    default: StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "Disabled"); break;
                    }
                }
                else
                {
                    StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "Disabled");
                }

                Connected = info.Connected == 1;
                if (!string.IsNullOrEmpty(info.DeviceStatus))
                {
                    DeviceStatus = info.DeviceStatus;
                }
                //if (!string.IsNullOrEmpty(info.ProductionStatus)) ProductionStatus = info.ProductionStatus;

                //DeviceStatusTime = TimeSpan.FromSeconds(info.DeviceStatusTimer);
            }
        }
        public DeviceItem(Footprint parent, DeviceDescription device)
        {
            InitializeComponent();
            root.DataContext = this;
            Parent           = parent;
            Device           = device;

            StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "Disabled");
        }
        public DeviceItem(ShopStatus parent, DeviceDescription device)
        {
            InitializeComponent();
            root.DataContext = this;
            Parent           = parent;
            Device           = device;

            StatusBrush = Brush_Functions.GetSolidBrushFromResource(this, "Disabled");

            if (!string.IsNullOrEmpty(device.Description.ImageUrl))
            {
                LoadDeviceImage(device.Description.ImageUrl);
            }
        }