コード例 #1
0
        private void closeProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ProjectPage page    = (ProjectPage)this.tablessTabControl.SelectedTab.Controls[0];
            Project     project = page.Project;

            CloseProject(project);
            Settings.Instance.Projects.Remove(project);
            Settings.Instance.Save();
        }
コード例 #2
0
        private void propertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ProjectPage   page    = (ProjectPage)this.tablessTabControl.SelectedTab.Controls[0];
            Project       project = page.Project;
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("Project name: " + project.Name);
            builder.AppendLine("AppID: " + project.AppID);
            builder.AppendLine("Project folder: " + project.ProjectFolder);
            builder.AppendLine("Publisher: " + project.publisher.ToString());
            MessageBox.Show(builder.ToString(), "Project info");
        }
コード例 #3
0
        public int OpenProject(Project project)
        {
            ProjectPage page = new ProjectPage();

            this.pageList.Items.Add(project.Name);
            this.pageList.ItemIcons.Add(projectIcon);
            page.Dock = DockStyle.Fill;

            TabPage tabPage = new TabPage();

            tabPage.Controls.Add(page);
            this.tablessTabControl.TabPages.Add(tabPage);
            page.SetProject(project);

            return(this.tablessTabControl.TabPages.Count - 1);
        }
コード例 #4
0
 public void CloseProject(Project project)
 {
     for (int i = 0; i < tablessTabControl.TabCount; i++)
     {
         if (this.tablessTabControl.TabPages[i].Controls[0] is ProjectPage)
         {
             ProjectPage page = (ProjectPage)this.tablessTabControl.TabPages[i].Controls[0];
             if (page.Project == project)
             {
                 if (tablessTabControl.SelectedIndex == i)
                 {
                     SelectPage(0);
                 }
                 tablessTabControl.TabPages.RemoveAt(i);
                 pageList.Items.RemoveAt(i);
                 break;
             }
         }
     }
 }
コード例 #5
0
 public void SetParent(ProjectPage parent)
 {
     this.parent = parent;
 }
コード例 #6
0
 public void SetParent(ProjectPage page)
 {
     parentPage = page;
 }