void video_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (currentScreenType != -1) { if (sender is VideoScreenUserControl) { var video = sender as VideoScreenUserControl; if(!video.IsDisplaying) return; foreach (var videoScreenUserControl in ResourceUtil.Listvideo) { if (!video.Equals(videoScreenUserControl)) { videoScreenUserControl.IsImportanceScreen = false; videoScreenUserControl.TblImportance.Visibility = Visibility.Hidden; } } //if (centreshowScreen.Content is CentreScreenVideo) //{ // var centre = centreshowScreen.Content as CentreScreenVideo; // //if (!video.IsFullScreen) // //{ // // //centre.RemoveVideoInGrid(video); // // //var full = new FullScreen(video); // // video.IsFullScreen = true; // // //full.ShowDialog(); // //} //} //Make importance this screen //SpecScreenOne specScreen = new SpecScreenOne(); //currentScreenType = 10; if (!video.IsImportanceScreen) { video.IsImportanceScreen = true; cbxChooseScreen.Visibility = Visibility.Collapsed; isImportanceScreen = true; video.TblImportance.Visibility = Visibility.Visible; if (_allvideScreenType.ContainsKey(7)) { ClearAllVideo(); var specScreenOne = _allvideScreenType[7] as SpecScreenOne; if (specScreenOne != null) specScreenOne.DrawControlsForMakeImportance(video); centreshowScreen.Content = _allvideScreenType[7]; } else { ClearAllVideo(); SpecScreenOne screen = new SpecScreenOne(); screen.DrawControlsForMakeImportance(video); _allvideScreenType.Add(7, screen); centreshowScreen.Content = screen; } } else { video.IsImportanceScreen = false; video.TblImportance.Visibility = Visibility.Hidden; cbxChooseScreen.Visibility = Visibility.Visible; isImportanceScreen = false; ClearAllVideo(); if (currentScreenType == 10) { if (_allvideScreenType.ContainsKey(7)) { ClearAllVideo(); var specScreenOne = _allvideScreenType[7] as SpecScreenOne; if (specScreenOne != null) specScreenOne.DrawControls(); centreshowScreen.Content = _allvideScreenType[7]; } else { ClearAllVideo(); SpecScreenOne screen = new SpecScreenOne(); screen.DrawControls(); _allvideScreenType.Add(7, screen); centreshowScreen.Content = screen; } } else { SetVideo(currentScreenType); } } //End } } }
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { // ... Get the ComboBox. var comboBox = sender as ComboBox; // ... Set SelectedItem as Window Title. string value = comboBox.SelectedItem as string; //test create a dynamic Screen //CentreScreenVideo screen = new CentreScreenVideo(); //screen.SetNumberofScreen(2); //centreshowScreen.Content = screen; if (comboBox.SelectedIndex == 0) // 2x2 Screen { currentScreenType = 2; SetVideo(2); } if (comboBox.SelectedIndex == 1) //3x3 Screen { currentScreenType = 3; SetVideo(3); } if (comboBox.SelectedIndex == 2) //4x4 Screen { currentScreenType = 4; SetVideo(4); } if (comboBox.SelectedIndex == 3)//5x5 Screen { currentScreenType = 5; SetVideo(5); } //if (comboBox.SelectedIndex == )//6x6 Screen //{ // SetVideo(6); //} if (comboBox.SelectedIndex == 4)// Special Screen { currentScreenType = 10; if (_allvideScreenType.ContainsKey(7)) { ClearAllVideo(); var specScreenOne = _allvideScreenType[7] as SpecScreenOne; if (specScreenOne != null) specScreenOne.DrawControls(); centreshowScreen.Content = _allvideScreenType[7]; } else { ClearAllVideo(); SpecScreenOne screen = new SpecScreenOne(); screen.DrawControls(); _allvideScreenType.Add(7, screen); centreshowScreen.Content = screen; } } if (comboBox.SelectedIndex == 5) // Special Screen { currentScreenType = 1; SetVideo(1); } }
void video_Stop() { if (currentScreenType != -1) { cbxChooseScreen.Visibility = Visibility.Visible; ClearAllVideo(); if (currentScreenType == 10) { if (_allvideScreenType.ContainsKey(7)) { ClearAllVideo(); var specScreenOne = _allvideScreenType[7] as SpecScreenOne; if (specScreenOne != null) specScreenOne.DrawControls(); centreshowScreen.Content = _allvideScreenType[7]; } else { ClearAllVideo(); SpecScreenOne screen = new SpecScreenOne(); screen.DrawControls(); _allvideScreenType.Add(7, screen); centreshowScreen.Content = screen; } } else { SetVideo(currentScreenType); } } }