public AudioConversion() { InitializeComponent(); var upax = ConfigText.GetBindingExpression(TextBox.TextProperty); var _inputBinding = new Binding("Value") { Mode = BindingMode.OneWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged, Path = new PropertyPath("AudioFiles"), Source = this, Converter = new AudioFilesToCfgMusicConverter(), ConverterParameter = ConversionParameters }; //_inputBinding.Converter = new AudioFilesToCfgMusicConverter {param = ConversionParameters}; ConfigText.SetBinding(TextBox.TextProperty, _inputBinding); ConversionParameters.PropertyChanged += (sender, args) => { var upx = ConfigText.GetBindingExpression(TextBox.TextProperty); upx.UpdateTarget(); }; encoder.OnProgress += (sender, conversion, args) => { var file = AudioFiles.FirstOrDefault((x => x.FileName == conversion.FileName)); if (file == null) { return; } file.ConversionProgress = args.Percent; }; }
private async void OpenEffectsRack_Click(object sender, RoutedEventArgs e) { await AudioEffect.Instance.SetSource(AudioEffect.CreateSource(AudioFiles.FirstOrDefault()?.InputFile.FullName)); var p = new FilterRack.FilterRack(AudioEffect.Instance); p.Show(); //AudioEffect.Instance.StartLivePlay(); FilterRackOpen = true; }