예제 #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            //ParmA.Baipingheng = tbBaipinghengA.Value;
            //ParmA.Baoguang = tbBaoguangA.Value;
            ParmA.Baohedu      = tbBaoheduA.Value;
            ParmA.Duibidu      = tbDuibiduA.Value;
            ParmA.Gama         = tbGamaA.Value;
            ParmA.Liangdu      = tbLiangduA.Value;
            ParmA.Niguangduibi = tbNiguangduibiA.Value;
            ParmA.Qingxidu     = tbQinxiduA.Value;
            //ParmA.Sediao = tbSediaoA.Value;
            ParmA.IsChange = ParmA.Equals(CameraParm);
            ParmA.Type     = ParmType.A;

            //ParmB.Baipingheng = tbBaipinghengB.Value;
            //ParmB.Baoguang = tbBaoguangB.Value;
            ParmB.Baohedu      = tbBaoheduB.Value;
            ParmB.Duibidu      = tbDuibiduB.Value;
            ParmB.Gama         = tbGamaB.Value;
            ParmB.Liangdu      = tbLiangduB.Value;
            ParmB.Niguangduibi = tbNiguangduibiB.Value;
            ParmB.Qingxidu     = tbQinxiduB.Value;
            //ParmB.Sediao = tbSediaoB.Value;
            ParmB.IsChange = ParmB.Equals(CameraParm);
            ParmB.Type     = ParmType.B;

            //ParmC.Baipingheng = tbBaipinghengC.Value;
            //ParmC.Baoguang = tbBaoguangC.Value;
            ParmC.Baohedu      = tbBaoheduC.Value;
            ParmC.Duibidu      = tbDuibiduC.Value;
            ParmC.Gama         = tbGamaC.Value;
            ParmC.Liangdu      = tbLiangduC.Value;
            ParmC.Niguangduibi = tbNiguangduibiC.Value;
            ParmC.Qingxidu     = tbQinxiduC.Value;
            //ParmC.Sediao = tbSediaoC.Value;
            ParmC.IsChange = ParmC.Equals(CameraParm);
            ParmC.Type     = ParmType.C;

            var aPath = Path.Combine(path, "Microspur.set");
            var bPath = Path.Combine(path, "Panorama.set");
            var cPath = Path.Combine(path, "Portrait.set");

            File.WriteAllText(aPath, ParmA.ToJson());
            File.WriteAllText(bPath, ParmB.ToJson());
            File.WriteAllText(cPath, ParmC.ToJson());

            CommHelp.ShowTips(LanguageHelp.GetTextLanguage("保存成功"));
        }
예제 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (ParmA == null)
            {
                ParmA = new VideoParm();
            }
            ParmA.Baipingheng     = tbBaipinghengA.Value;
            ParmA.BaipinghengAuto = chkBaipinghengA.Checked;
            ParmA.Baoguang        = tbBaoguangA.Value;
            ParmA.BaoguangAuto    = chkBaoguangA.Checked;
            ParmA.Baohedu         = tbBaoheduA.Value;
            ParmA.Duibidu         = tbDuibiduA.Value;
            ParmA.Gama            = tbGamaA.Value;
            ParmA.Liangdu         = tbLiangduA.Value;
            ParmA.Qingxidu        = tbQinxiduA.Value;
            //ParmA.Sediao = tbSediaoA.Value;
            ParmA.Fenbian     = ddlFenbianlvA.Text;
            ParmA.Gonglv      = tbGonglvA.Value;
            ParmA.Duijiao     = tbDuijiaoA.Value;
            ParmA.DuijiaoAuto = chkDuijiaoA.Checked;
            ParmA.Zengyi      = tbZengyiA.Value;
            ParmA.IsChange    = ParmA.Equals(CameraParm);
            ParmA.Type        = ParmType.A;

            if (ParmB == null)
            {
                ParmB = new VideoParm();
            }
            ParmB.Baipingheng     = tbBaipinghengB.Value;
            ParmB.BaipinghengAuto = chkBaipinghengB.Checked;
            ParmB.Baoguang        = tbBaoguangB.Value;
            ParmB.BaoguangAuto    = chkBaoguangB.Checked;
            ParmB.Baohedu         = tbBaoheduB.Value;
            ParmB.Duibidu         = tbDuibiduB.Value;
            ParmB.Gama            = tbGamaB.Value;
            ParmB.Liangdu         = tbLiangduB.Value;
            ParmB.Qingxidu        = tbQinxiduB.Value;
            //ParmB.Sediao = tbSediaoB.Value;
            ParmB.Fenbian     = ddlFenbianlvB.Text;
            ParmB.Gonglv      = tbGonglvB.Value;
            ParmB.Duijiao     = tbDuijiaoB.Value;
            ParmB.DuijiaoAuto = chkDuijiaoB.Checked;
            ParmB.Zengyi      = tbZengyiB.Value;
            ParmB.IsChange    = ParmB.Equals(CameraParm);
            ParmB.Type        = ParmType.B;

            if (ParmC == null)
            {
                ParmC = new VideoParm();
            }
            ParmC.Baipingheng     = tbBaipinghengC.Value;
            ParmC.BaipinghengAuto = chkBaipinghengC.Checked;
            ParmC.Baoguang        = tbBaoguangC.Value;
            ParmC.BaoguangAuto    = chkBaoguangC.Checked;
            ParmC.Baohedu         = tbBaoheduC.Value;
            ParmC.Duibidu         = tbDuibiduC.Value;
            ParmC.Gama            = tbGamaC.Value;
            ParmC.Liangdu         = tbLiangduC.Value;
            ParmC.Qingxidu        = tbQinxiduC.Value;
            //ParmC.Sediao = tbSediaoC.Value;
            ParmC.Fenbian     = ddlFenbianlvC.Text;
            ParmC.Gonglv      = tbGonglvC.Value;
            ParmC.Duijiao     = tbDuijiaoC.Value;
            ParmC.DuijiaoAuto = chkDuijiaoC.Checked;
            ParmC.Zengyi      = tbZengyiC.Value;
            ParmC.IsChange    = ParmC.Equals(CameraParm);
            ParmC.Type        = ParmType.C;

            var aPath = Path.Combine(path, "Microspur.set");
            var bPath = Path.Combine(path, "Panorama.set");
            var cPath = Path.Combine(path, "Portrait.set");

            File.WriteAllText(aPath, ParmA.ToJson());
            File.WriteAllText(bPath, ParmB.ToJson());
            File.WriteAllText(cPath, ParmC.ToJson());

            CommHelp.ShowTips("保存成功");
        }