コード例 #1
0
 private void About_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (AboutClicked != null)
     {
         AboutClicked.Invoke();
     }
 }
コード例 #2
0
ファイル: View.cs プロジェクト: akhdrv/MIRecognizer
        public View()
        {
            InitializeComponent();
            presenter = new PlayerPresenter(this, new PlayerModel(this.Handle));

            #region Event Bindings
            Load += (s, e) => {
                Reset();
                presenter.BindModel();
            };
            FormClosed += (s, e) => presenter.Dispose();
            openToolStripMenuItem.Click       += (s, e) => OpenFileClicked.Invoke(s, e);
            clearCacheToolStripMenuItem.Click += (s, e) => ClearCacheClicked.Invoke(s, e);
            playPauseToolStripMenuItem.Click  += (s, e) => PlayPauseInvoked.Invoke(s, e);
            playPauseButton.Click             += (s, e) => PlayPauseInvoked.Invoke(s, e);
            stopButton.Click             += (s, e) => StopInvoked.Invoke(s, e);
            stopToolStripMenuItem.Click  += (s, e) => StopInvoked.Invoke(s, e);
            aboutToolStripMenuItem.Click += (s, e) => AboutClicked.Invoke(s, e);
            exitToolStripMenuItem.Click  += (s, e) => Close();

            timeline.MouseMove += (s, e) =>
            {
                if (TimelinePushed)
                {
                    PlaybackPosition = Math.Min(timeline.Width - slider.Width, Math.Max(e.X, 0)) /
                                       Convert.ToDouble(timeline.Width - slider.Width);
                }
            };
            timeline.MouseDown += (s, e) =>
            {
                TimelinePushed   = true;
                PlaybackPosition = Math.Min(timeline.Width - slider.Width, Math.Max(e.X, 0)) /
                                   Convert.ToDouble(timeline.Width - slider.Width);
            };
            timeline.MouseUp             += (s, e) => TimelinePushed = false;
            timeline.MouseCaptureChanged += (s, e) => TimelinePushed = false;
            #endregion
        }
コード例 #3
0
ファイル: MainView.cs プロジェクト: KnightAlter/Kapture
 private void AboutBtn_Click(object sender, EventArgs e)
 {
     AboutClicked?.Invoke(this, e);
 }
コード例 #4
0
ファイル: Menu.cs プロジェクト: ycaihua/CurveLock
 private void AboutLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     AboutClicked.Invoke(this, EventArgs.Empty);
 }