コード例 #1
0
        private void StartProject(bool activate)
        {
#if DEMO
            searchExpired = true;
#endif
            if (currentSong == null)
            {
                return;
            }

            // Check if the song is already running
            foreach (IProject p in Program.Presenter.projects)
            {
                if (p.GetProjectType() == ProjectType.Song)
                {
                    SongProject songp = (SongProject)p;
                    if (songp.currentSong.AutoNumber == currentSong.AutoNumber)
                    {
                        Program.Presenter.ActivateController(songp);
                        this.Deactivate();
                        return;
                    }
                }
            }

            SongProject sp = new SongProject(currentSong);
            Program.Presenter.AddProject(sp);
            if (activate)
            {
                sp.Activate();
            }
            this.Deactivate(); // Clear ui
        }
コード例 #2
0
        protected override void OnMouseDoubleClick(MouseEventArgs e)
        {
            base.OnMouseDoubleClick(e);

            int slidenum = -1;

            foreach (int i in slideRectMapping.Keys)
            {
                Rectangle r2 = slideRectMapping[i];
                r2.Y -= HitAdjust;
                if (r2.Contains(e.Location))
                {
                    slidenum = i;
                }
            }
            if (slidenum > -1)
            {
                proj.GotoSlide(slidenum); // This will trigger this control to refresh
                proj.Activate();
            }
        }
コード例 #3
0
ファイル: SongProjectView.cs プロジェクト: radtek/epresenter
 // Event handlers
 private void btnActivate_Click(object sender, EventArgs e)
 {
     proj.Activate();
 }