コード例 #1
0
 void FillFormats()
 {
     videoStandardList = Misc.FillImageFormat(imagecombobox, VideoStandards.Capture,
                                              App.Current.Config.CaptureVideoStandard);
     encProfileList = Misc.FillEncodingFormat(encodingcombobox, App.Current.Config.CaptureEncodingProfile);
     qualList       = Misc.FillQuality(qualitycombobox, App.Current.Config.CaptureEncodingQuality);
 }
コード例 #2
0
        public VideoEditionProperties(Window parent)
        {
            TransientFor = parent;
            this.Build();
            Icon        = Misc.LoadIcon(App.Current.SoftwareIconName, IconSize.Button, 0);
            encSettings = new EncodingSettings();
            stdStore    = Misc.FillImageFormat(sizecombobox, VideoStandards.Rendering,
                                               App.Current.Config.RenderVideoStandard);
            encStore  = Misc.FillEncodingFormat(formatcombobox, App.Current.Config.RenderEncodingProfile);
            qualStore = Misc.FillQuality(qualitycombobox, App.Current.Config.RenderEncodingQuality);
            descriptioncheckbutton.Active      = App.Current.Config.OverlayTitle;
            audiocheckbutton.Active            = App.Current.Config.EnableAudio;
            mediafilechooser1.FileChooserMode  = FileChooserMode.File;
            mediafilechooser1.FilterName       = "Multimedia Files";
            mediafilechooser1.FilterExtensions = new string [] { "*.mkv", "*.mp4", "*.ogg",
                                                                 "*.avi", "*.mpg", "*.vob" };
            mediafilechooser2.FileChooserMode = FileChooserMode.Directory;
            mediafilechooser2.ChangedEvent   += (sender, e) => {
                OutputDir = mediafilechooser2.CurrentPath;
            };

            watermarkSelector.ResetButtonHeight      = RESET_BUTTON_HEIGHT;
            watermarkSelector.ImageButtonPressEvent += HandleChangeWatermarkClicked;
            watermarkSelector.ResetButton.Clicked   += (sender, e) => ResetWatermark();
            watermarkcheckbutton.Toggled            += HandleWatermarkCheckToggled;
            if (App.Current.Config.Watermark != null)
            {
                SetWatermarkPreview();
            }
            else
            {
                ResetWatermark();
            }
            watermarkcheckbutton.Active = App.Current.Config.AddWatermark;

            if (App.Current.LicenseManager != null)
            {
                bool canRemoveWatermark = App.Current.LicenseLimitationsService.CanExecute(VASFeature.Watermark.ToString());
                watermarkcheckbutton.Sensitive = canRemoveWatermark;
                if (!canRemoveWatermark)
                {
                    watermarkcheckbutton.Active = true;
                    watermarkLabel.Visible      = watermarkSelector.Visible = false;
                    if (App.Current.Config.Watermark != null)
                    {
                        ResetWatermark();
                    }
                }
            }
            ModifyBg(StateType.Normal, Misc.ToGdkColor(App.Current.Style.ThemeContrastDisabled));
            containerRegular.ModifyBg(StateType.Normal, Misc.ToGdkColor(App.Current.Style.ThemeBase));
        }
コード例 #3
0
        public VideoPreferencesPanel()
        {
            this.Build();

            if (App.Current.Config.FPS_N == 30)
            {
                fpscombobox.Active = 1;
            }
            else if (App.Current.Config.FPS_N == 50)
            {
                fpscombobox.Active = 2;
            }
            else if (App.Current.Config.FPS_N == 60)
            {
                fpscombobox.Active = 3;
            }
            else
            {
                fpscombobox.Active = 0;
            }
            fpscombobox.Changed += HandleFPSChanged;
            Misc.FillImageFormat(renderimagecombo, VideoStandards.Rendering, App.Current.Config.RenderVideoStandard);
            Misc.FillEncodingFormat(renderenccombo, App.Current.Config.RenderEncodingProfile);
            Misc.FillQuality(renderqualcombo, App.Current.Config.RenderEncodingQuality);

            Misc.FillImageFormat(captureimagecombo, VideoStandards.Capture, App.Current.Config.CaptureVideoStandard);
            Misc.FillEncodingFormat(captureenccombo, App.Current.Config.CaptureEncodingProfile);
            Misc.FillQuality(capturequalcombo, App.Current.Config.CaptureEncodingQuality);

            renderimagecombo.Changed  += HandleImageChanged;
            captureimagecombo.Changed += HandleImageChanged;

            renderenccombo.Changed  += HandleEncodingChanged;
            captureenccombo.Changed += HandleEncodingChanged;

            renderqualcombo.Changed  += HandleQualityChanged;
            capturequalcombo.Changed += HandleQualityChanged;

            enableSound = new CheckButton();
            rendertable.Attach(enableSound, 1, 2, 3, 4,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            enableSound.CanFocus = false;
            enableSound.Show();
            enableSound.Active   = App.Current.Config.EnableAudio;
            enableSound.Toggled += (sender, e) => {
                App.Current.Config.EnableAudio = enableSound.Active;
            };

            overlayTitle = new CheckButton();
            rendertable.Attach(overlayTitle, 1, 2, 4, 5,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            overlayTitle.CanFocus = false;
            overlayTitle.Show();
            overlayTitle.Active   = App.Current.Config.OverlayTitle;
            overlayTitle.Toggled += (sender, e) => {
                App.Current.Config.OverlayTitle = overlayTitle.Active;
            };

            addWatermark = new CheckButton();
            rendertable.Attach(addWatermark, 1, 2, 5, 6,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            addWatermark.CanFocus = false;
            addWatermark.Show();
            addWatermark.Active   = App.Current.Config.AddWatermark;
            addWatermark.Toggled += (sender, e) => {
                App.Current.Config.AddWatermark = addWatermark.Active;
            };

            SizeGroup sgroup  = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup sgroup2 = new SizeGroup(SizeGroupMode.Horizontal);

            foreach (Widget w in generaltable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
                else
                {
                    sgroup2.AddWidget(w);
                }
            }
            foreach (Widget w in capturetable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
                else
                {
                    sgroup2.AddWidget(w);
                }
            }
            foreach (Widget w in rendertable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
                else
                {
                    sgroup2.AddWidget(w);
                }
            }
        }
コード例 #4
0
        public VideoPreferencesPanel()
        {
            this.Build();

            if (App.Current.Config.FPS_N == 30)
            {
                fpscombobox.Active = 1;
            }
            else if (App.Current.Config.FPS_N == 50)
            {
                fpscombobox.Active = 2;
            }
            else if (App.Current.Config.FPS_N == 60)
            {
                fpscombobox.Active = 3;
            }
            else
            {
                fpscombobox.Active = 0;
            }
            fpscombobox.Changed += HandleFPSChanged;
            Misc.FillImageFormat(renderimagecombo, VideoStandards.Rendering, App.Current.Config.RenderVideoStandard);
            Misc.FillEncodingFormat(renderenccombo, App.Current.Config.RenderEncodingProfile);
            Misc.FillQuality(renderqualcombo, App.Current.Config.RenderEncodingQuality);

            Misc.FillImageFormat(captureimagecombo, VideoStandards.Capture, App.Current.Config.CaptureVideoStandard);
            Misc.FillEncodingFormat(captureenccombo, App.Current.Config.CaptureEncodingProfile);
            Misc.FillQuality(capturequalcombo, App.Current.Config.CaptureEncodingQuality);

            renderimagecombo.Changed  += HandleImageChanged;
            captureimagecombo.Changed += HandleImageChanged;

            renderenccombo.Changed  += HandleEncodingChanged;
            captureenccombo.Changed += HandleEncodingChanged;

            renderqualcombo.Changed  += HandleQualityChanged;
            capturequalcombo.Changed += HandleQualityChanged;

            enableSound = new CheckButton();
            rendertable.Attach(enableSound, 1, 2, 3, 4,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            enableSound.CanFocus = false;
            enableSound.Show();
            enableSound.Active   = App.Current.Config.EnableAudio;
            enableSound.Toggled += (sender, e) => {
                App.Current.Config.EnableAudio = enableSound.Active;
            };

            overlayTitle = new CheckButton();
            rendertable.Attach(overlayTitle, 1, 2, 4, 5,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            overlayTitle.CanFocus = false;
            overlayTitle.Show();
            overlayTitle.Active   = App.Current.Config.OverlayTitle;
            overlayTitle.Toggled += (sender, e) => {
                App.Current.Config.OverlayTitle = overlayTitle.Active;
            };

            addWatermark = new CheckButton();
            rendertable.Attach(addWatermark, 1, 2, 5, 6,
                               AttachOptions.Fill,
                               AttachOptions.Fill, 0, 0);
            addWatermark.CanFocus = false;
            addWatermark.Show();

            watermarkSelector.ResetButtonHeight      = RESET_BUTTON_HEIGHT;
            watermarkSelector.ImageButtonPressEvent += HandleChangeWatermarkClicked;
            watermarkSelector.ResetButton.Clicked   += (sender, e) => ResetWatermark();
            if (App.Current.Config.Watermark != null)
            {
                SetWatermarkPreview();
            }
            else
            {
                ResetWatermark();
            }

            if (App.Current.LicenseManager != null)
            {
                bool canRemoveWatermark = App.Current.LicenseLimitationsService.CanExecute(VASFeature.Watermark.ToString());
                addWatermark.Sensitive = canRemoveWatermark;
                if (!canRemoveWatermark)
                {
                    addWatermark.Active    = true;
                    watermarkLabel.Visible = watermarkSelector.Visible = false;
                }
                else
                {
                    addWatermark.Active    = App.Current.Config.AddWatermark;
                    watermarkLabel.Visible = watermarkSelector.Visible = addWatermark.Active;
                }
            }

            addWatermark.Toggled += (sender, e) => {
                App.Current.Config.AddWatermark = addWatermark.Active;
                watermarkLabel.Visible          = watermarkSelector.Visible = addWatermark.Active;
            };

            SizeGroup sgroup  = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup sgroup2 = new SizeGroup(SizeGroupMode.Horizontal);

            foreach (Widget w in generaltable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
                else
                {
                    sgroup2.AddWidget(w);
                }
            }
            foreach (Widget w in capturetable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
                else
                {
                    sgroup2.AddWidget(w);
                }
            }
            foreach (Widget w in rendertable)
            {
                if (w is Label)
                {
                    sgroup.AddWidget(w);
                }
                else
                {
                    sgroup2.AddWidget(w);
                }
            }
        }