Esempio n. 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();
        }
Esempio n. 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");
        }
Esempio n. 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);
        }
Esempio n. 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;
             }
         }
     }
 }
Esempio n. 5
0
 public void SetParent(ProjectPage parent)
 {
     this.parent = parent;
 }
Esempio n. 6
0
 public void SetParent(ProjectPage page)
 {
     parentPage = page;
 }