/// <summary> /// Create seletor instance /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SelectButton_Click(object sender, System.Windows.RoutedEventArgs e) { try { seletor.Show(); } catch { seletor = new Seletor(this); seletor.Show(); } }
/// <summary> /// Constructor /// </summary> public Player() { InitializeComponent(); DataContext = this; this.Closed += (__, _) => App.Current.Shutdown(); IsPlaying = IsPlayingToggle.IsChecked; IsPlayingToggle.Click += IsPlayingToggle_Click; SelectButton.Click += SelectButton_Click; seletor = new Seletor(this); SetUriTextBlock(); // Set the uri status IsPlayingChanged += Play; FpsTextBox.PreviewTextInput += IInputx_PreviewTextInput; FpsTextBox.TextChanged += FpsTextBox_PreviewTextInput; }