コード例 #1
0
        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);
        }