static public void SetConfig(CaptureConfig cc, string sectionName)
        {
            SettingItem imageSetting = AppSettingHelper.GetSpecifySection(sectionName);

            imageSetting.BatchBegin();
            try
            {
                imageSetting.WriteSetting("VideoDeviceName", cc.VideoDeviceName);
                imageSetting.WriteInt("ResolutionIndex", cc.ResolutionIndex);
                imageSetting.WriteInt("InputPort", cc.InputPort);
                imageSetting.WriteSetting("VideoEncode", cc.VideoEncode.ToString());

                imageSetting.WriteBool("SoundHint", cc.SoundHint);
                imageSetting.WriteBool("PopupHint", cc.PopupHint);
                imageSetting.WriteInt("FrameRate", cc.FrameRate);
                imageSetting.WriteBool("RecordDate", cc.RecordDate);

                imageSetting.BatchCommit();
            }
            catch (Exception ex)
            {
                imageSetting.BatchCancel();
                MsgBox.ShowException(ex);
            }
        }
        static public void SetConfig(ImageConfig ic, string sectionName)
        {
            SettingItem imageSetting = AppSettingHelper.GetSpecifySection(sectionName);

            imageSetting.BatchBegin();
            try
            {
                imageSetting.WriteInt("RecordCount", ic.RecordCount);

                imageSetting.BatchCommit();
            }
            catch (Exception ex)
            {
                imageSetting.BatchCancel();
                MsgBox.ShowException(ex);
            }
        }
Beispiel #3
0
        static public void SetConfig(InfoConfig ic, string sectionName)
        {
            SettingItem imageSetting = AppSettingHelper.GetSpecifySection(sectionName);

            imageSetting.BatchBegin();
            try
            {
                imageSetting.WriteDouble("ZoomFactor", ic.ZoomFactor);

                imageSetting.BatchCommit();
            }
            catch (Exception ex)
            {
                imageSetting.BatchCancel();
                MsgBox.ShowException(ex);
            }
        }
Beispiel #4
0
        static public void SetConfig(QueueShowConfig qsc, string userAccount, string sectionName)
        {
            SettingItem queueShowSetting = AppSettingHelper.GetSpecifySection(userAccount + "_" + sectionName);

            queueShowSetting.BatchBegin();
            try
            {
                queueShowSetting.WriteSetting("QueueNames", JsonHelper.SerializeObject(qsc.QueueNames));
                //queueShowSetting.WriteInt("WaitCount", qsc.WaitCount);
                //queueShowSetting.WriteSetting("BackgroundImage", qsc.BackgroundImage);

                queueShowSetting.BatchCommit();
            }
            catch (Exception ex)
            {
                queueShowSetting.BatchCancel();
                MsgBox.ShowException(ex);
            }
        }
        static public void SetConfig(TimerConfig tc, string sectionName)
        {
            SettingItem timerSetting = AppSettingHelper.GetSpecifySection(sectionName);

            timerSetting.BatchBegin();
            try
            {
                timerSetting.WriteDateTime("LastTime1", tc.LastTime1);
                timerSetting.WriteDateTime("LastTime2", tc.LastTime2);
                timerSetting.WriteDateTime("LastTime3", tc.LastTime3);
                timerSetting.WriteDateTime("LastTime4", tc.LastTime4);
                timerSetting.WriteDateTime("LastTime5", tc.LastTime5);

                timerSetting.BatchCommit();
            }
            catch (Exception ex)
            {
                timerSetting.BatchCancel();

                MsgBox.ShowException(ex);
            }
        }