示例#1
0
        public bool SetLightValue(LightPara LightParaIn)
        {
            IDictionaryEnumerator enumerator = this.LightCtrls.GetEnumerator();

            if (LightParaIn == null)
            {
                return(false);
            }
            while (enumerator.MoveNext())
            {
                LightCtrlBase lightCtrl = enumerator.Value as LightCtrlBase;
                if (lightCtrl.lightCtrlParaItem.LightCtrlName == LightParaIn.LightCtrl)
                {
                    lightCtrl.SetLightValue((int)LightParaIn.Panel, LightParaIn.LightValue);
                }
            }
            return(true);
        }
示例#2
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex < 0)
     {
         return;
     }
     if (e.ColumnIndex == 3)
     {
         LightPara item = (LightPara)this.dataGridView1.CurrentRow.DataBoundItem;
         LightCtrlManager.Instance.SetLightValue(item);//设置光源亮度
     }
     if (e.ColumnIndex == 4)
     {
         if (e.RowIndex < TeachCamLightPara.lightPara.Count())
         {
             this.TeachCamLightPara.lightPara.RemoveAt(e.RowIndex);
         }
     }
 }