From 9e51636569818990ba9adf34c7b46c8cff6825cf Mon Sep 17 00:00:00 2001 From: Sekoree Date: Sun, 10 Jul 2022 18:33:54 +0200 Subject: [PATCH] Add option to use Real+Imaginary average value --- RendererUI/ViewModels/MainWindowViewModel.cs | 18 ++++++++ RendererUI/Views/MainWindow.axaml | 22 +++++++--- SekoRenderer/Renderer.cs | 46 ++++++++++++++++---- 3 files changed, 72 insertions(+), 14 deletions(-) diff --git a/RendererUI/ViewModels/MainWindowViewModel.cs b/RendererUI/ViewModels/MainWindowViewModel.cs index 103bacb..4850d6a 100644 --- a/RendererUI/ViewModels/MainWindowViewModel.cs +++ b/RendererUI/ViewModels/MainWindowViewModel.cs @@ -34,10 +34,28 @@ public bool UseImaginaryFFTValues get => _renderer.UseImaginaryFFTValues; set { + if (value) + { + UseImaginaryAndRealAverage = false; + } _renderer.UseImaginaryFFTValues = value; this.RaisePropertyChanged(); } } + + public bool UseImaginaryAndRealAverage + { + get => _renderer.UseImaginaryAndRealAverage; + set + { + if (value) + { + UseImaginaryFFTValues = false; + } + _renderer.UseImaginaryAndRealAverage = value; + this.RaisePropertyChanged(); + } + } [Reactive] public ObservableCollection FFTWindows { get; set; } = new(); [Reactive] public string SelectedFFTWindow { get; set; } diff --git a/RendererUI/Views/MainWindow.axaml b/RendererUI/Views/MainWindow.axaml index ad8a767..8be6455 100644 --- a/RendererUI/Views/MainWindow.axaml +++ b/RendererUI/Views/MainWindow.axaml @@ -14,7 +14,7 @@ + + + + + -