示例#1
0
        public TransDetailOption GetAppOption()
        {
            TransDetailOption option = new TransDetailOption();

            option.is_change_size = checkBoxIsChangeSize.Checked;
            if (!int.TryParse(textBoxTransChangeWidth.Text, out option.change_width))
            {
                option.change_width = 0;
            }
            if (!int.TryParse(textBoxTransChangeHeight.Text, out option.change_height))
            {
                option.change_height = 0;
            }
            option.is_fix_aspect = checkBoxTransIsFixAspect.Checked;
            if (radioButtonTransNormal.Checked)
            {
                option.trans_avi_kind = TransDetailOption.TransAviKind.Normal;
            }
            else if (radioButtonTransBgr24Flip.Checked)
            {
                option.trans_avi_kind = TransDetailOption.TransAviKind.Bgr24Flip;
            }
            else if (radioButtonTransBgr24.Checked)
            {
                option.trans_avi_kind = TransDetailOption.TransAviKind.Bgr24;
            }
            else if (radioButtonTransYuv420p.Checked)
            {
                option.trans_avi_kind = TransDetailOption.TransAviKind.Yuv420p;
            }
            else if (radioButtonTransHuffyuv.Checked)
            {
                option.trans_avi_kind = TransDetailOption.TransAviKind.Huffyuv;
            }
            option.is_show_window      = checkBoxWindowShow.Checked;
            option.is_only_sm          = checkBoxIsOnlySm.Checked;
            option.is_only_nm          = checkBoxIsOnlyNm.Checked;
            option.is_framerate_change = radioButtonFrameRateChange.Checked;
            option.frame_rate          = textBoxFrameRate.Text;
            return(option);
        }
示例#2
0
        public void SetAppOption(TransDetailOption option)
        {
            checkBoxIsChangeSize.Checked     = option.is_change_size;
            textBoxTransChangeWidth.Text     = (option.change_width > 0 ? option.change_width.ToString() : "");
            textBoxTransChangeHeight.Text    = (option.change_height > 0 ? option.change_height.ToString() : "");
            checkBoxTransIsFixAspect.Checked = option.is_fix_aspect;
            switch (option.trans_avi_kind)
            {
            case TransDetailOption.TransAviKind.Normal:
                radioButtonTransNormal.Checked = true;
                break;

            case TransDetailOption.TransAviKind.Bgr24Flip:
                radioButtonTransBgr24Flip.Checked = true;
                break;

            case TransDetailOption.TransAviKind.Bgr24:
                radioButtonTransBgr24.Checked = true;
                break;

            case TransDetailOption.TransAviKind.Yuv420p:
                radioButtonTransYuv420p.Checked = true;
                break;

            case TransDetailOption.TransAviKind.Huffyuv:
                radioButtonTransHuffyuv.Checked = true;
                break;
            }
            checkBoxWindowShow.Checked = option.is_show_window;
            checkBoxIsOnlySm.Checked   = option.is_only_sm;
            checkBoxIsOnlyNm.Checked   = option.is_only_nm;
            if (option.is_framerate_change)
            {
                radioButtonFrameRateChange.Checked = true;
            }
            else
            {
                radioButtonFrameRateNoChange.Checked = true;
            }
            textBoxFrameRate.Text = option.frame_rate;
        }
示例#3
0
 public void InformClosedFormTransOption(TransDetailOption option)
 {
     trans_detail_option_ = option;
     form_trans_option_   = null;
 }