Example #1
0
        public void DisplaySite(Site iSite)
        {
            frmSite pFrmSite = new frmSite(iSite);

            pFrmSite.MdiParent   = this;
            pFrmSite.WindowState = FormWindowState.Maximized;
            pFrmSite.Show();
        }
Example #2
0
        private IDockContent GetContentFromPersistString(string persistString)
        {
            try
            {
                if (persistString == typeof(frmSection).ToString())
                {
                    m_pFrmSection = frmSection.getInstance();
                    m_pFrmSection.Show(m_pDockPanel, DockState.Document);

                    return(m_pFrmSection);
                }
                else if (persistString == typeof(frmSite).ToString())
                {
                    m_pFrmSite = frmSite.getInstance();
                    m_pFrmSite.InitializeSiteList((m_pSiteObjList));
                    m_pFrmSite.Show(m_pDockPanel, DockState.Document);
                    return(m_pFrmSite);
                }
                else if (persistString == typeof(frmInspector).ToString())
                {
                    m_pFrmInspector = frmInspector.getInstance();
                    m_pFrmInspector.Show(m_pDockPanel, DockState.Document);
                    return(m_pFrmInspector);
                }
                else if (persistString == typeof(frmRainMap).ToString())
                {
                    m_pFrmRainMap = frmRainMap.getInstance();
                    m_pFrmRainMap.DrawRainMap(m_pSiteRainCalc, m_pDbHelper);
                    m_pFrmRainMap.Show(m_pDockPanel, DockState.Document);
                    m_pFrmRainMap.SizeChanged += new EventHandler(m_pFrmRainMap_SizeChanged);
                    return(m_pFrmRainMap);
                }
                //else if (persistString == typeof(frmToolBar).ToString())
                //{
                //    //m_pFrmToolbar = frmToolBar.getInstance();
                //    //m_pFrmToolbar.Show(m_pDockPanel, DockState.Document);
                //    //return m_pFrmToolbar;
                //}
                else
                {
                    //NewLayout();
                    return(null);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("没有找到可用的布局文件,窗体将自动排列", "警告");
                return(null);
            }
        }
Example #3
0
        private void NewLayout()
        {
            m_pFrmSection = frmSection.getInstance();
            m_pFrmSection.Show(m_pDockPanel, DockState.Document);
            m_pFrmSection.InitializeSectionList(m_pDbHelper, CAlarmSound.getInstance(), m_pSectionObjList);

            m_pFrmSite = frmSite.getInstance();
            m_pFrmSite.InitializeSiteList((m_pSiteObjList));
            m_pFrmSite.Show(m_pDockPanel, DockState.Document);

            m_pFrmRainMap = frmRainMap.getInstance();
            m_pFrmRainMap.DrawRainMap(m_pSiteRainCalc, m_pDbHelper);
            m_pFrmRainMap.Show(m_pDockPanel, DockState.Document);

            m_pFrmInspector = frmInspector.getInstance();
            m_pFrmInspector.Show(m_pDockPanel, DockState.Document);

            //m_pFrmToolbar = frmToolBar.getInstance();
            //m_pFrmToolbar.Show(m_pDockPanel, DockState.Document);
        }
Example #4
0
        private void siteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSite tela = new frmSite();

            tela.Show();
        }