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(QueueConfig qc, string sectionName) { AppSetting.BatchBegin(); try { SettingItem queueSetting = AppSettingHelper.GetSpecifySection(sectionName); queueSetting.WriteSetting("DefaultQueueName", qc.DefaultQueueName); AppSetting.BatchCommit(); } catch (Exception ex) { AppSetting.BatchCancel(); MsgBox.ShowException(ex); } }
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); } }