Ejemplo n.º 1
0
        /// <summary>
        /// 编辑系统配置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btEditSysCfg_Click(object sender, EventArgs e)
        {
            JFXCfg       sysCfg = JFHubCenter.Instance.SystemCfg;
            FormXCfgEdit fm     = new FormXCfgEdit();

            fm.AllowAddTypes.Add(typeof(Point));
            fm.AllowAddTypes.Add(typeof(JFMotionParam));
            fm.AllowAddTypes.Add(typeof(JFHomeParam));
            fm.AllowAddTypes.Add(typeof(MyStruct));
            fm.AllowAddTypes.Add(typeof(JFLinearCalibData));
            fm.SetCfg(sysCfg);
            fm.ShowDialog();

            //JFXCfg _cfg = new JFXCfg();
            //double[][] demo = new double[2][] { new double[]{ 0,0.1}, new double[]{1.2,3.4 } };
            //_cfg.AddItem("二维数组测试", demo,"定制参数");
            //_cfg.Save("111.xml");
            //fm = new FormXCfgEdit();
            //fm.SetCfg(_cfg);
            //fm.ShowDialog();
        }
Ejemplo n.º 2
0
        //FormDllMgr _dllFm = new FormDllMgr(); //拓展动态库管理界面

        private void FormCfg_Load(object sender, EventArgs e)
        {
            tabCtrl.TabPages.Clear();
            FormStationEnables fse = new FormStationEnables();

            AddPage(fse, "工站使能管理");
            fse.Show();
            AddPage(new FormStationCfgMgr(), "工站配置管理"); // 可能不需要在此添加,每个工站的测试界面都有一个配置界面
            AddPage(new FormDllMgr(), "拓展Dll管理");

            FormInitorMgr fmDevMgr = new FormInitorMgr();

            fmDevMgr.InitorType = typeof(IJFDevice);
            AddPage(fmDevMgr, "设备管理"); //设备管理

            AddPage(new FormDeviceCellNameManager(), "设备通道命名");

            FormInitorMgr fmStationMgr = new FormInitorMgr();

            fmStationMgr.InitorCaption = "工站";
            fmStationMgr.InitorType    = typeof(IJFStation);
            AddPage(fmStationMgr, "工站管理"); //工站管理



            AddPage(new FormRecipeMgr(), "产品配方管理");


            FormXCfgEdit fm = new FormXCfgEdit();

            fm.AllowAddTypes.Add(typeof(Point));
            fm.AllowAddTypes.Add(typeof(JFMotionParam));
            fm.AllowAddTypes.Add(typeof(JFHomeParam));
            fm.AllowAddTypes.Add(typeof(JFLinearCalibData));
            fm.SetCfg(JFHubCenter.Instance.SystemCfg);
            AddPage(fm, "系统配置");

            tabCtrl.SelectedIndex = 0;
        }