示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //
            ScrollBarBrigh.Value      = DevColorInfo[0].DefaultVal;
            ScrollBarContrast.Value   = DevColorInfo[1].DefaultVal;
            ScrollBarSaturation.Value = DevColorInfo[2].DefaultVal;
            ScrollBarSharp.Value      = DevColorInfo[4].DefaultVal;
            ScrollBarHue.Value        = DevColorInfo[3].DefaultVal;

            //
            BrightVal.Text   = System.Convert.ToString(ScrollBarBrigh.Value);
            ContrastVal.Text = System.Convert.ToString(ScrollBarContrast.Value);
            SaturatVal.Text  = System.Convert.ToString(ScrollBarSaturation.Value);
            SharpVal.Text    = System.Convert.ToString(ScrollBarSharp.Value);
            HueVal.Text      = System.Convert.ToString(ScrollBarHue.Value);



            if (DxMediaFunction.DeviceInfo[Form1.nCard].dwOpenDevState == 0)
            {
                for (int i = 0; i < 5; i++)
                {
                    DxMediaApi.DXSetDisplayPara(DxMediaFunction.DeviceInfo[Form1.nCard].dwCardHandle, i, DevColorInfo[i].DefaultVal, 0);
                }
            }
        }
示例#2
0
 private void ScrollBarHue_Scroll(object sender, ScrollEventArgs e)
 {
     DxMediaFunction.HueValue = ScrollBarHue.Value;
     HueVal.Text = System.Convert.ToString(ScrollBarHue.Value);
     if (DxMediaFunction.DeviceInfo[Form1.nCard].dwOpenDevState == 0)
     {
         DxMediaApi.DXSetDisplayPara(DxMediaFunction.DeviceInfo[Form1.nCard].dwCardHandle, 3, DxMediaFunction.HueValue, 0);
         DxMediaApi.WritePrivateProfileString("VideoPar", " Hue" + Convert.ToString(Form1.nCard), HueVal.Text, DxMediaFunction.IniFileName);
     }
 }