Add PaymentChartWindow

This commit is contained in:
2023-09-04 00:52:18 +02:00
parent 545622a2ab
commit 6f4e3474b8
13 changed files with 1236 additions and 2 deletions

@ -0,0 +1,30 @@
using Elwig.Helpers;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Controls;
namespace Elwig.Dialogs {
public partial class LinearPriceIncreaseDialog : Window {
public double Price = 0.0;
public LinearPriceIncreaseDialog() {
InitializeComponent();
}
private void ConfirmButton_Click(object sender, RoutedEventArgs evt) {
DialogResult = true;
Price = double.Parse(PriceInput.Text.Replace("\u202f", ""));
Close();
}
private void UpdateButtons(ValidationResult res) {
ConfirmButton.IsEnabled = res.IsValid;
}
private void PriceInput_TextChanged(object sender, TextChangedEventArgs evt) {
var res = Validator.CheckDecimal(PriceInput, true, 2, 8);
UpdateButtons(res);
}
}
}