コード例 #1
0
 public FrmCamLightCtrl(CameraLightPara camLightParaIn)
 {
     InitializeComponent();
     InitCombobox();//初始化相机Cbx
     this.TeachCamLightPara = camLightParaIn;
     this.SaveCamLightPara  = camLightParaIn;
     this.panelDataGridComboBoxColumn.Items.Clear();
     foreach (LightPanelEnum temp in Enum.GetValues(typeof(LightPanelEnum)))
     {
         this.panelDataGridComboBoxColumn.Items.Add(temp);
     }
     this.panelDataGridComboBoxColumn.ValueType = typeof(LightPanelEnum);
     this.lightCtrlDataGridViewComboBoxColumn.Items.Clear();
     foreach (LightCtrlEmun temp in Enum.GetValues(typeof(LightCtrlEmun)))
     {
         this.lightCtrlDataGridViewComboBoxColumn.Items.Add(temp);
     }
     this.lightCtrlDataGridViewComboBoxColumn.ValueType = typeof(LightCtrlEmun);
     this.dataGridView1.DataSource = this.TeachCamLightPara.lightPara;
     this.ExposureBar.Value        = camLightParaIn.Exposure;         //同步曝光时间
     this.TriggerCheck.Checked     = camLightParaIn.TriggerModel;     //同步触发模式
     this.CamCbx.SelectedValue     = camLightParaIn.CamName;          //选定相机
     this.FilterCheck.Checked      = this.TeachCamLightPara.IsFilter; //是否滤波
     this.FilterCNumUpDn.Value     = (decimal)TeachCamLightPara.FilterC;
 }
コード例 #2
0
        private void ParaSaveBtn_Click(object sender, EventArgs e)
        {
            DialogResult dlt = MessageBox.Show("是否保存", "参数保存", MessageBoxButtons.YesNo);

            if (dlt == DialogResult.Yes)
            {
                this.SaveCamLightPara = TeachCamLightPara;
            }
        }
コード例 #3
0
 /// <summary>
 /// 加载配置
 /// </summary>
 /// <returns></returns>
 public static CameraLightPara Load(string Path)
 {
     try {
         CameraLightPara obj = (CameraLightPara)Serializition.LoadFromFile(typeof(CameraLightPara), Path + ConfigName);
         return(obj);
     }
     catch (Exception ex) {
         throw new LoadException(Path + ConfigName, ex.Message);
     }
 }
コード例 #4
0
        public bool Read(string Path)
        {
            bool IsOk = true;

            //string path = Path + ConfigName + @"\";
            this.localPara.Read(Path);
            this.ProjectVisionItem = XML <ProjectVisionEnum> .Read(Path + "ProjectVisionItem.xml");

            this.ProjectVisionName = XML <string> .Read(Path + "ProjectVisioName.xml");

            this.camLightPara = XML <CameraLightPara> .Read(Path + "camLightPara.xml");

            return(IsOk);
        }
コード例 #5
0
 /// <summary>
 /// 清除空对象,保证所有写入对象不为空
 /// </summary>
 /// <returns></returns>
 public bool ClearNullObj()
 {
     if (this.ProjectVisionItem == null)
     {
         this.ProjectVisionItem = ProjectVisionEnum.ProjectVision0;
     }
     if (this.ProjectVisionName == null)
     {
         this.ProjectVisionName = "";
     }
     if (this.camLightPara == null)
     {
         this.camLightPara = new CameraLightPara();
     }
     return(true);
 }
コード例 #6
0
ファイル: CaliParam.cs プロジェクト: Gz1d/Gz
 public CaliParam()
 {
     this.camLightPara   = new CameraLightPara();
     this.localPara      = new LocalPara();
     this.AngleRange     = 10.0;
     this.StartCaliPt    = new Point3Db();
     this.EndCaliPt      = new Point3Db();
     this.IsMoveX        = false;
     this.IsMoveY        = false;
     this.caliModel      = CaliModelEnum.HandEyeCali;
     this.HomMat         = new MyHomMat2D();
     this.ListRectRegion = new List <RectangleF>();
     this.ListPt2D       = new List <Point2Db>();
     this.cam            = CameraEnum.Cam0;
     this.describe       = "未定义";
     this.CoordiCam      = CoordiCamHandEyeMatEnum.Coordi0Cam0;
 }