public void InitialUserControls() { this.InitialControlCollection(); foreach (IGeneralSubSys current in this.m_AllSubSys) { try { IUISubSys iUISubSys = current as IUISubSys; if (iUISubSys != null) { this.AddTreeNodes(iUISubSys); this.AddToolStrips(iUISubSys); this.AddMenuItems(iUISubSys); } IGisSubSysWsf gisSubSysWsf = current as IGisSubSysWsf; if (gisSubSysWsf != null) { this.m_GisForm = gisSubSysWsf.GisForm; } } catch (Exception ex) { WriteLog.Logger.Error("add UI Failed : " + ex.StackTrace); throw ex; } } this.LoadToolStripByXml(); this.CreateToolStripPanel(); }
private void AddToolStrips(IUISubSys wsf) { if (wsf.SubToolStrips != null) { this.m_SubSysType2ToolStripListDic.Add(wsf.GetType().FullName, wsf.SubToolStrips); } }
private void AddMenuItems(IUISubSys wsf) { if (wsf.SubMenuItems != null) { foreach (IMenuItemOperation current in wsf.SubMenuItems) { this.MenuItems.Add(current); } } }
private void AddTreeNodes(IUISubSys wsf) { if (wsf.SubTreeNodes != null) { foreach (ITreeNodeOperation current in wsf.SubTreeNodes) { this.SetTreeNode(current, this.m_TreeTypeToTreeView[current.TreeType]); } } }
public void Dispose() { foreach (IGeneralSubSys current in this.m_AllSubSys) { IUISubSys iUISubSys = current as IUISubSys; if (iUISubSys != null && iUISubSys.SubToolStrips != null) { foreach (FloatingToolStrip current2 in iUISubSys.SubToolStrips) { current2.Dispose(); } } current.Dispose(); } this.ClearTreeNode(); }