Exemplo n.º 1
0
 public ControlBar()
 {
     InitializeComponent();
     this.Background              = new SolidColorBrush(Colors.Transparent);
     Seekbar.TimePositionChanged += Seekbar_OnTimePositionChange;
     Seekbar.PositionChanged     += (position) => PositionChanged?.Invoke(position);
     Volume.VolumeChanged        += (volume) => VolumeChanged?.Invoke(volume);
     Play.PlayStateChanged       += (play) => PlayStateChanged?.Invoke(play);
     Maximize.Clicked            += () => MaximizeClicked?.Invoke();
     Menu.AudioClicked           += () => AudiosClicked?.Invoke();
     Menu.SubtitlesClicked       += () => SubtitlesClicked?.Invoke();
     Menu.ExitClicked            += () => ExitClicked?.Invoke();
     Menu.ConfigClicked          += () => ConfigClicked?.Invoke();
     this.MouseLeave             += ControlBar_MouseLeave;
     this.MouseEnter             += ControlBar_MouseEnter;
 }
Exemplo n.º 2
0
 public Menu()
 {
     InitializeComponent();
     top.Visibility  = Visibility.Collapsed;
     MouseLeave     += Menu_MouseLeave;
     MouseEnter     += Menu_MouseEnter;
     Open.Clicked   += () => MenuIsShown = !MenuIsShown;
     Config.Clicked += () =>
     {
         FastOff();
         ConfigClicked?.Invoke();
     };
     Audio.Clicked += () =>
     {
         FastOff();
         AudioClicked?.Invoke();
     };
     Subs.Clicked += () =>
     {
         FastOff();
         SubtitlesClicked?.Invoke();
     };
     Exit.Clicked += () => ExitClicked?.Invoke();
 }
 protected virtual void OnConfigClicked(EventArgs e)
 {
     ConfigClicked?.Invoke(this, e);
 }