public AudioPanelViewModel(EncodingViewModel encodingViewModel) : base(encodingViewModel) { this.audioOutputPreviews = new ObservableCollection<AudioOutputPreview>(); this.audioEncodings = new ObservableCollection<AudioEncodingViewModel>(); this.fallbackEncoderChoices = new List<AudioEncoderViewModel>(); Messenger.Default.Register<AudioInputChangedMessage>( this, message => { this.NotifyAudioInputChanged(); }); Messenger.Default.Register<SelectedTitleChangedMessage>( this, message => { this.NotifyAudioInputChanged(); }); Messenger.Default.Register<ContainerChangedMessage>( this, message => { this.RefreshFallbackEncoderChoices(); // Refresh the preview as the warnings displayed may change. this.RefreshAudioPreview(); }); }
public PicturePanelViewModel(EncodingViewModel encodingViewModel) : base(encodingViewModel) { this.scaleChoices = new List<ComboChoice<VCScaleMethod>> { new ComboChoice<VCScaleMethod>(VCScaleMethod.Lanczos, EncodingRes.ScaleMethod_Lanczos), new ComboChoice<VCScaleMethod>(VCScaleMethod.Bicubic, EncodingRes.ScaleMethod_BicubicOpenCL) }; Messenger.Default.Register<RotationChangedMessage>( this, message => { this.RefreshOutputSize(); }); }
public CustomFormatViewModel(IServiceContainer serviceContainer, IApplicationSettings settings, ICustomLogFileFormatCreatorPlugin plugin, IEnumerable <EncodingViewModel> encodings, CustomLogFileFormat customFormat) { _serviceContainer = serviceContainer; _settings = settings; _logFileFormatRegistry = serviceContainer.Retrieve <ILogFileFormatRegistry>(); _pluginId = customFormat.PluginId; _plugin = plugin; _encodings = encodings; _customFormat = customFormat; _name = customFormat.Name; _encoding = Encodings.FirstOrDefault(x => Equals(x.Encoding, customFormat.Encoding)); _format = customFormat.Format; }
public AdvancedPanelViewModel(EncodingViewModel encodingViewModel) : base(encodingViewModel) { Messenger.Default.Register<AdvancedOptionsChangedMessage>( this, message => { if (!this.suppressUIUpdate) { this.UpdateUIFromAdvancedOptions(); } this.RaisePropertyChanged(() => this.AdvancedOptionsString); }); Messenger.Default.Register<VideoCodecChangedMessage>( this, message => { this.RaisePropertyChanged(() => this.X264CodecSelected); }); }
public VideoFiltersPanelViewModel(EncodingViewModel encodingViewModel) : base(encodingViewModel) { this.denoiseChoices = new List<ComboChoice<VCDenoise>> { new ComboChoice<VCDenoise>(VCDenoise.Off, CommonRes.Off), new ComboChoice<VCDenoise>(VCDenoise.hqdn3d, EnumsRes.Denoise_HQDN3D), new ComboChoice<VCDenoise>(VCDenoise.NLMeans, EnumsRes.Denoise_NLMeans), }; // Right now both hqdn3d and NL-Means have the same preset choices. this.denoisePresetChoices = new List<ComboChoice> { new ComboChoice("ultralight", EnumsRes.DenoisePreset_Ultralight), new ComboChoice("light", EnumsRes.DenoisePreset_Light), new ComboChoice("medium", EnumsRes.DenoisePreset_Medium), new ComboChoice("strong", EnumsRes.DenoisePreset_Strong), new ComboChoice("custom", CommonRes.Custom), }; this.denoiseTuneChoices = new List<ComboChoice> { new ComboChoice("none", CommonRes.None), new ComboChoice("film", EnumsRes.DenoiseTune_Film), new ComboChoice("grain", EnumsRes.DenoiseTune_Grain), new ComboChoice("highmotion", EnumsRes.DenoiseTune_HighMotion), new ComboChoice("animation", EnumsRes.DenoiseTune_Animation), }; this.rotationChoices = new List<RotationViewModel> { new RotationViewModel { Rotation = VCPictureRotation.None, Display = CommonRes.None }, new RotationViewModel { Rotation = VCPictureRotation.Clockwise90, Display = EncodingRes.Rotation_Clockwise90, Image = "/Icons/rotate_90_cw.png"}, new RotationViewModel { Rotation = VCPictureRotation.Clockwise270, Display = EncodingRes.Rotation_Counterclockwise90, Image = "/Icons/rotate_90_ccw.png" }, new RotationViewModel { Rotation = VCPictureRotation.Clockwise180, Display = EncodingRes.Rotation_180, Image = "/Icons/rotate_180.png" } }; }
public void OpenEncodingWindow() { var encodingWindow = WindowManager.FindWindow(typeof(EncodingViewModel)) as EncodingViewModel; this.EncodingWindowOpen = true; if (encodingWindow == null) { encodingWindow = new EncodingViewModel(Ioc.Container.GetInstance <PresetsViewModel>().SelectedPreset.Preset); encodingWindow.Closing = () => { this.EncodingWindowOpen = false; // Focus the main window after closing. If they used a keyboard shortcut to close it might otherwise give up // focus on the app altogether. WindowManager.FocusWindow(this.main); }; WindowManager.OpenWindow(encodingWindow, this.main); } else { WindowManager.FocusWindow(encodingWindow); } }
public void OpenEncodingWindow() { var encodingWindow = WindowManager.FindWindow(typeof(EncodingViewModel)) as EncodingViewModel; this.EncodingWindowOpen = true; if (encodingWindow == null) { encodingWindow = new EncodingViewModel(Ioc.Container.GetInstance<PresetsViewModel>().SelectedPreset.Preset); encodingWindow.Closing = () => { this.EncodingWindowOpen = false; // Focus the main window after closing. If they used a keyboard shortcut to close it might otherwise give up // focus on the app altogether. WindowManager.FocusWindow(this.main); }; WindowManager.OpenWindow(encodingWindow, this.main); } else { WindowManager.FocusWindow(encodingWindow); } }
protected PanelViewModel(EncodingViewModel encodingViewModel) { this.encodingViewModel = encodingViewModel; }
public VideoPanelViewModel(EncodingViewModel encodingViewModel) : base(encodingViewModel) { this.encoderChoices = new List<VideoEncoderViewModel>(); this.framerateChoices = new List<double> { 0 }; foreach (var framerate in Encoders.VideoFramerates) { this.framerateChoices.Add(double.Parse(framerate.Name, CultureInfo.InvariantCulture)); } this.RefreshLevelCompatibility(); Messenger.Default.Register<AudioInputChangedMessage>( this, message => { this.NotifyAudioInputChanged(); }); Messenger.Default.Register<SelectedTitleChangedMessage>( this, message => { this.NotifyAudioInputChanged(); }); Messenger.Default.Register<SelectedTitleChangedMessage>( this, message => { this.RefreshLevelCompatibility(); }); Messenger.Default.Register<OutputSizeChangedMessage>( this, message => { this.RefreshLevelCompatibility(); }); Messenger.Default.Register<FramerateChangedMessage>( this, message => { this.RefreshLevelCompatibility(); }); Messenger.Default.Register<AdvancedOptionsChangedMessage>( this, message => { this.RaisePropertyChanged(() => this.X264AdditionalOptions); }); Messenger.Default.Register<ContainerChangedMessage>( this, message => { // If the encoder changes due to a profile change, we'll want to apply default settings for the encoder. this.RefreshEncoderChoices(message.ContainerName, applyDefaults: true); }); }