//public bool CloseCurrentProject() //{ // DockContent doc = null; // foreach (KeyValuePair<DockContent, IProject> pair in this.m_MainFormUIManager.MainForm.MapProject) // { // doc = pair.Key; // } // this.m_MainFormUIManager.MainForm.ContentRemoved(doc); // return true; //} public bool CloseCurrentProjectUI() { if (null != ProjectSingleton.CurrentProject) { this.m_MainFormUIManager.MainForm.ClearToolStripPanel(); this.m_MainFormUIManager.MainForm.ClearMenuStripPanel(); this.m_MainFormUIManager.MainForm.AutoTestManager.RemoveAutoTestFunction(); LegendManagement.RemoveCurLegend(); List <IDockContent> list = new List <IDockContent>(); foreach (IDockContent content in this.m_MainFormUIManager.MainForm.DockPanelInstance.Contents) { DockContent content2 = content as DockContent; bool flag = false; if (null != content2) { flag = ("ProjectExplorerFrm".Equals(content2.Name) || "EventForm".Equals(content2.Name)) || "ResourceForm".Equals(content2.Name); } if (!((content2 == null) || flag)) { list.Add(content); } } foreach (IDockContent content3 in list) { content3.DockHandler.Close(); } this.m_MainFormUIManager.MainForm.ClearPages(); } return(true); }
public ColorForm() { this.components = null; this.m_Transparent = 0xff; this.m_ShowLegendTab = true; this.InitializeComponent(true); IColorBase base2 = IColorBase.CreateInstance(); this.display1.ValueChanged += new EventHandler(this.display1_ValueChanged); this.display1.InitializeSystem(base2); this.m_legendmanager = LegendManagement.CretateInstance(); }
public ColorForm(IColorBase iCB) { this.components = null; this.m_Transparent = 0xff; this.m_ShowLegendTab = true; this.InitializeComponent(true); this.m_legendmanager = LegendManagement.CretateInstance(); this.InitializeSystem(this.m_legendmanager, ref iCB); this.display1.InitializeSystem(iCB); this.display1.ValueChanged += new EventHandler(this.display1_ValueChanged); this.trackBarTransport.Visible = false; this.Percent.Visible = false; this.Transparent.Visible = false; }
public ColorForm(IColorBase iCB, int transparent, bool showLegendTab) { this.components = null; this.m_Transparent = 0xff; this.m_ShowLegendTab = true; this.m_ShowLegendTab = showLegendTab; this.InitializeComponent(showLegendTab); this.m_legendmanager = LegendManagement.CretateInstance(); this.InitializeSystem(this.m_legendmanager, ref iCB); this.display1.InitializeSystem(iCB); this.display1.ValueChanged += new EventHandler(this.display1_ValueChanged); this.trackBarTransport.Visible = showLegendTab; this.Percent.Visible = showLegendTab; this.Transparent.Visible = showLegendTab; if (showLegendTab) { this.trackBarTransport.Value = Convert.ToInt32((int) (((0xff - transparent) * 100) / 0xff)); this.Percent.Text = this.trackBarTransport.Value + "%"; this.m_Transparent = transparent; } }
private void InitializeSystem(LegendManagement LM) { if ((LM != null) && (LM.Utility != null)) { foreach (LegendUtility utility in LM.Utility) { if (utility.ClassName.Equals(this.m_CurrentLegendUtilName)) { this.checkBox_Legend.Checked = true; break; } } } }
private void InitializeSystem(LegendManagement LM, ref IColorBase iCB) { if ((LM != null) && (LM.Utility != null)) { foreach (LegendUtility utility in LM.Utility) { if (utility.ClassName.Equals(iCB.Properties2DisplayAll.Name)) { iCB.Properties2DisplayAll.IsAddToLegend = true; break; } } } }