public void Attach(IVFVideoEffect intf)
        {
            _intf = intf as IVFVideoEffectLightness;

            if (_intf == null)
            {
                return;
            }

            tbLightness.Value = _intf.Value;
        }
        public void Attach(IVFVideoEffect effect)
        {
            _intf = effect as IVFVideoEffectImageLogo;
            if (_intf == null)
            {
                return;
            }

            edImageLogoFilename.Text       = _intf.Filename;
            edImageLogoLeft.Text           = _intf.Left.ToString();
            edImageLogoTop.Text            = _intf.Top.ToString();
            tbImageLogoTransp.Value        = _intf.TransparencyLevel;
            pnImageLogoColorKey.ForeColor  = _intf.ColorKey;
            cbImageLogoUseColorKey.Checked = _intf.UseColorKey;
            cbImageLogoShowAlways.Checked  = _intf.StartTime == TimeSpan.Zero && _intf.StopTime == TimeSpan.Zero;
        }
 public void Fill(IVFVideoEffect effect)
 {
     _intf = effect as IVFVideoEffectImageLogo;
     EffectUpdate(_intf);
 }
Ejemplo n.º 4
0
        public void Attach(IVFVideoEffect effect)
        {
            _intf = effect as IVFVideoEffectTextLogo;
            if (_intf == null)
            {
                return;
            }

            StringFormat formatFlags = _intf.StringFormat;

            cbTextLogoVertical.Checked    = (formatFlags.FormatFlags & StringFormatFlags.DirectionVertical) != 0;
            cbTextLogoRightToLeft.Checked = (formatFlags.FormatFlags & StringFormatFlags.DirectionRightToLeft) != 0;
            cbTextLogoAlign.SelectedIndex = (int)formatFlags.Alignment;
            edTextLogo.Text            = _intf.Text;
            edTextLogoLeft.Text        = _intf.Left.ToString();
            edTextLogoTop.Text         = _intf.Top.ToString();
            fontDialog1.Font           = _intf.Font;
            fontDialog1.Color          = _intf.FontColor;
            cbTextLogoTranspBG.Checked = _intf.BackgroundTransparent;

            pnTextLogoBGColor.BackColor          = _intf.BackgroundColor;
            cbTextLogoAntialiasing.SelectedIndex = (int)_intf.Antialiasing;
            cbTextLogoDrawMode.SelectedIndex     = (int)_intf.DrawQuality;

            if (_intf.RectWidth > 0 && _intf.RectHeight > 0)
            {
                edTextLogoWidth.Text  = _intf.RectWidth.ToString();
                edTextLogoHeight.Text = _intf.RectHeight.ToString();
            }
            else
            {
                edTextLogoWidth.Text  = "0";
                edTextLogoHeight.Text = "0";
            }

            switch (_intf.RotationMode)
            {
            case VFTextRotationMode.RmNone:
                rbTextLogoDegree0.Checked = true;
                break;

            case VFTextRotationMode.Rm90:
                rbTextLogoDegree90.Checked = true;
                break;

            case VFTextRotationMode.Rm180:
                rbTextLogoDegree180.Checked = true;
                break;

            case VFTextRotationMode.Rm270:
                rbTextLogoDegree270.Checked = true;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            switch (_intf.FlipMode)
            {
            case VFTextFlipMode.None:
                rbTextLogoFlipNone.Checked = true;
                break;

            case VFTextFlipMode.X:
                rbTextLogoFlipX.Checked = true;
                break;

            case VFTextFlipMode.Y:
                rbTextLogoFlipY.Checked = true;
                break;

            case VFTextFlipMode.XAndY:
                rbTextLogoFlipXY.Checked = true;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            cbTextLogoGradientEnabled.Checked = _intf.GradientEnabled;
            cbTextLogoGradMode.SelectedIndex  = (int)_intf.GradientMode;
            pnTextLogoGradColor1.BackColor    = _intf.GradientColor1;
            pnTextLogoGradColor2.BackColor    = _intf.GradientColor2;

            cbTextLogoEffectrMode.SelectedIndex = (int)_intf.BorderMode;
            pnTextLogoInnerColor.BackColor      = _intf.BorderInnerColor;
            pnTextLogoOuterColor.BackColor      = _intf.BorderOuterColor;
            edTextLogoInnerSize.Text            = _intf.BorderInnerSize.ToString();
            edTextLogoOuterSize.Text            = _intf.BorderOuterSize.ToString();

            cbTextLogoShapeEnabled.Checked    = _intf.Shape;
            edTextLogoShapeLeft.Text          = _intf.ShapeLeft.ToString();
            edTextLogoShapeTop.Text           = _intf.ShapeTop.ToString();
            cbTextLogoShapeType.SelectedIndex = (int)_intf.ShapeType;
            edTextLogoShapeWidth.Text         = _intf.ShapeWidth.ToString();
            edTextLogoShapeHeight.Text        = _intf.ShapeHeight.ToString();
            pnTextLogoShapeColor.BackColor    = _intf.ShapeColor;

            tbTextLogoTransp.Value = _intf.TransparencyLevel;

            switch (_intf.Mode)
            {
            case TextLogoMode.Text:
                rbTextLogoDrawText.Checked = true;
                break;

            case TextLogoMode.DateTime:
                rbTextLogoDrawDate.Checked = true;
                break;

            case TextLogoMode.Timestamp:
                rbTextLogoDrawTimestamp.Checked = true;
                break;

            case TextLogoMode.FrameNumber:
                rbTextLogoDrawFrameNumber.Checked = true;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            cbTextLogoFadeIn.Checked  = _intf.FadeIn;
            cbTextLogoFadeOut.Checked = _intf.FadeOut;
        }
 public void Fill(IVFVideoEffect effect)
 {
     _intf = effect as IVFVideoEffectLightness;
     EffectUpdate(_intf);
 }