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