public static void Show(Camera camera) { var videoWindow = new VideoWindow() { Title = "Видео с камеры " + camera.Address, Address = camera.Address, Left = camera.Left, Top = camera.Top, Width = camera.Width, Height = camera.Height }; if (camera.IgnoreMoveResize) { videoWindow.WindowStyle = System.Windows.WindowStyle.None; videoWindow.MinHeight = videoWindow.MaxHeight = videoWindow.Height; videoWindow.MinWidth = videoWindow.MaxWidth = videoWindow.Width; videoWindow._title.Text = videoWindow.Title; videoWindow._headerGrid.Visibility = Visibility.Visible; } if (ActiveAddresses.Contains(camera.Address) == false) { ActiveAddresses.Add(camera.Address); videoWindow.Closed += new System.EventHandler(videoWindow_Closed); videoWindow.Show(); } }
public CameraDetailsViewModel(Camera camera = null) { ShowZonesCommand = new RelayCommand(OnShowZones); TestCommand = new RelayCommand(OnTest); StateClasses = new List<XStateClass>(); StateClasses.Add(XStateClass.Fire1); StateClasses.Add(XStateClass.Fire2); StateClasses.Add(XStateClass.Attention); StateClasses.Add(XStateClass.Ignore); if (camera != null) { Title = "Редактировать камеру"; Camera = camera; } else { Title = "Создать камеру"; Camera = new Camera() { Name = "Новая камера", Address = "192.168.0.1" }; } CopyProperties(); }
public static void ShowModal(Camera camera) { var videoWindow = new VideoWindow() { Title = "Видео с камеры " + camera.Address, Address = camera.Address, Left = camera.Left, Top = camera.Top, Width = camera.Width, Height = camera.Height }; videoWindow.ShowDialog(); camera.Left = (int)videoWindow.Left; camera.Top = (int)videoWindow.Top; camera.Width = (int)videoWindow.Width; camera.Height = (int)videoWindow.Height; }
void OnTest() { var camera = new FiresecAPI.Models.Camera() { Address = Address, Left = Left, Top = Top, Width = Width, Height = Height, IgnoreMoveResize = IgnoreMoveResize }; VideoService.ShowModal(camera); //"172.16.7.202" Left = camera.Left; Top = camera.Top; Width = camera.Width; Height = camera.Height; }
public CameraViewModel(Camera camera) { Camera = camera; ShowPropertiesCommand = new RelayCommand(OnShowProperties); }
public CameraViewModel(Camera camera) { Camera = camera; }