Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
		static VideoWindow CreateWindow(Camera camera)
		{
			var title = camera.Name;
			if(string.IsNullOrEmpty(title))
				title = "Видео с камеры " + camera.Address;

			var videoWindow = new VideoWindow()
			{
				Title = title,
				Address = camera.Address,
				Left = camera.Left,
				Top = camera.Top,
				Width = camera.Width,
				Height = camera.Height
			};
			return videoWindow;
		}
Esempio n. 3
0
        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;
        }