コード例 #1
0
        public MFrm()
        {
            InitializeComponent();
            this.WindowState = FormWindowState.Maximized;

            state              = new CState();
            RdXml              = new RD_XmlReadWrite();
            Scenemana          = new STKScenObjs(this);
            state.isSceneSetUp = false;
            state.workMode     = CState.WorkMode.SimMode;//默认为仿真模式

            chartView = new ChartView();
            chartView.Hide();
            trafficView = new TrafficView();
            trafficView.Hide();
            showusers = new ShowUsers(this);
            showusers.Hide();
            wcmd = new wincmd(this);
            wcmd.Hide();
            //主要目的是新建一个苟窗体
            djg = new Django(this);
            djg.Hide();
            //新建一个excel帮助器
            //ehelper = new excelhelp(this);
        }
コード例 #2
0
        private void CloseScene()
        {
            try
            {
                AxAGI.STKX.AxAgUiAxVOCntrl crl3d = new AxAGI.STKX.AxAgUiAxVOCntrl();
                AxAGI.STKX.AxAgUiAx2DCntrl crl2d = new AxAGI.STKX.AxAgUiAx2DCntrl();

                crl3d.Dock = DockStyle.Fill;
                crl2d.Dock = DockStyle.Fill;


                tabPage1.Controls.Clear(); //清空3d场景
                tabPage2.Controls.Clear(); //清空2d场景

                axAgUiAxVOCntrl1.Dispose();
                axAgUiAx2DCntrl1.Dispose();

                tabPage1.Controls.Add(crl3d);
                tabPage2.Controls.Add(crl2d);

                axAgUiAxVOCntrl1 = crl3d;
                axAgUiAx2DCntrl1 = crl2d;

                Thread.Sleep(100);
                state.isSceneSetUp = false;
                //清空信息队列和建立链路的索引
                this.Scenemana.msglist.Clear();
                //this.index = 0;
                //覆盖性能相关的复原工作
                covsetup = false;
                信关站覆盖显示ToolStripMenuItem.Checked = false;
                //每次重启的时候强行终止所有的excel程序,防止下次出现错误
                string res;
                CmdHelper.RunCmd("taskkill /f /im excel.exe", out res);
                //0810再次更改
                this.Scenemana = new STKScenObjs(this);
            }
            catch
            {
            }
        }