static public CaptureConfig GetConfig(string sectionName) { CaptureConfig cc = new CaptureConfig(); try { SettingItem imageSetting = AppSettingHelper.GetSpecifySection(sectionName); cc.VideoDeviceName = imageSetting.ReadSetting("VideoDeviceName"); cc.ResolutionIndex = imageSetting.ReadInt("ResolutionIndex"); cc.InputPort = imageSetting.ReadInt("InputPort"); cc.VideoEncode = (VideoCodec)Enum.Parse(typeof(VideoCodec), imageSetting.ReadSetting("VideoEncode", VideoCodec.MPEG4.ToString())); cc.SoundHint = imageSetting.ReadBool("SoundHint"); cc.PopupHint = imageSetting.ReadBool("PopupHint"); cc.FrameRate = imageSetting.ReadInt("FrameRate"); cc.RecordDate = imageSetting.ReadBool("RecordDate"); } catch (Exception ex) { MsgBox.ShowException(ex); } return(cc); }
static public QueueConfig GetConfig(string sectionName) { QueueConfig qc = new QueueConfig(); try { SettingItem queueSetting = AppSettingHelper.GetSpecifySection(sectionName); qc.DefaultQueueName = queueSetting.ReadSetting("DefaultQueueName"); } catch (Exception ex) { MsgBox.ShowException(ex); } return(qc); }
static public QueueShowConfig GetConfig(string userAccount, string sectionName) { QueueShowConfig qsc = new QueueShowConfig(); try { SettingItem queueShowSetting = AppSettingHelper.GetSpecifySection(userAccount + "_" + sectionName); qsc.QueueNames = JsonHelper.DeserializeObject <List <QueueItem> >(queueShowSetting.ReadSetting("QueueNames")); //qsc.WaitCount = queueShowSetting.ReadInt("WaitCount"); //qsc.BackgroundImage = queueShowSetting.ReadSetting("BackgroundImage"); } catch (Exception ex) { MsgBox.ShowException(ex); } return(qsc); }