public LayoutPartCameraViewModel(LayoutPartReferenceProperties properties) { if (properties != null) { Camera = ClientManager.SystemConfiguration.Cameras.FirstOrDefault(item => item.UID == properties.ReferenceUID); } }
public LayoutPartCameraViewModel(LayoutPartReferenceProperties properties) { Title = "Камера"; IconSource = LayoutPartDescription.IconPath + "BVideo.png"; _сameraTitle = null; _properties = properties ?? new LayoutPartReferenceProperties(); var selectedCamera = ClientManager.SystemConfiguration.Cameras.FirstOrDefault(item => item.UID == _properties.ReferenceUID); UpdateLayoutPart(selectedCamera); }
public LayoutPartVerificationViewModel(LayoutPartReferenceProperties properties) { Title = "Верификация"; IconSource = LayoutPartDescription.IconPath + "BLevels.png"; _properties = properties ?? new LayoutPartReferenceProperties(); DeviceViewModel deviceViewModel = null; var gkDevice = GKManager.Devices.FirstOrDefault(x => x.UID == _properties.ReferenceUID); if (gkDevice != null) { deviceViewModel = new DeviceViewModel(gkDevice); } if (deviceViewModel != null) { UpdateLayoutPart(deviceViewModel.NameAndAddress); } else { UpdateLayoutPart("Устройство не указано"); } }
public VerificationViewModel(LayoutPartReferenceProperties layoutPartSKDVerificationProperties) { DeviceUID = layoutPartSKDVerificationProperties.ReferenceUID; ServiceFactory.Events.GetEvent<NewJournalItemsEvent>().Unsubscribe(OnNewJournals); ServiceFactory.Events.GetEvent<NewJournalItemsEvent>().Subscribe(OnNewJournals); }
public TemplateContainerPartViewModel(LayoutPartReferenceProperties properties) { var layout = ClientManager.LayoutsConfiguration.Layouts.FirstOrDefault(item => item.UID == properties.ReferenceUID); LayoutContainer = new LayoutContainer(this, layout); }