diff --git a/WGneu/WGneu.csproj.user b/WGneu/WGneu.csproj.user
index c31958b..16941c8 100644
--- a/WGneu/WGneu.csproj.user
+++ b/WGneu/WGneu.csproj.user
@@ -7,17 +7,11 @@
-
- Code
-
Code
-
- Designer
-
Designer
diff --git a/WGneu/Windows/BankDetailsWindow.xaml b/WGneu/Windows/BankDetailsWindow.xaml
deleted file mode 100644
index 9d8ae6b..0000000
--- a/WGneu/Windows/BankDetailsWindow.xaml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/WGneu/Windows/BankDetailsWindow.xaml.cs b/WGneu/Windows/BankDetailsWindow.xaml.cs
deleted file mode 100644
index 88038cb..0000000
--- a/WGneu/Windows/BankDetailsWindow.xaml.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-using WGneu.Models;
-
-
-namespace WGneu.Windows {
- ///
- /// Interaktionslogik für BankDetailsWindow.xaml
- ///
- public partial class BankDetailsWindow : Window {
- public BankDetailsWindow() {
- InitializeComponent();
- }
-
- private void Iban_TextChanged(object sender, TextChangedEventArgs e) {
- string iban = "";
- int pos = Iban.CaretIndex;
- for (int i = 0, v = 0; i < Iban.Text.Length && v < 34; i++) {
- char ch = Iban.Text[i];
- if (Char.IsLetterOrDigit(ch) && Char.IsAscii(ch)) {
- if (v != 0 && v % 4 == 0)
- iban += ' ';
- v++;
- iban += Char.ToUpper(ch);
- }
- if (i == Iban.CaretIndex - 1)
- pos = iban.Length;
- if (iban.StartsWith("AT") && v >= 20)
- break;
- }
- Iban.Text = iban;
- Iban.CaretIndex = pos;
-
- if (Iban.IsFocused)
- GenerateBankDetails();
- }
-
- private void Iban_LostFocus(object sender, EventArgs e) {
- // TODO vaildate checksum
- }
-
- private void BankCode_TextChanged(object sender, TextChangedEventArgs e) {
- string cc = "AT";
- string code = "";
- int pos = BankCode.CaretIndex;
-
- if (cc == "AT") {
-
- for (int i = 0, v = 0; i < BankCode.Text.Length && v < 5; i++) {
- char ch = BankCode.Text[i];
- if (Char.IsDigit(ch)) {
- v++;
- code += ch;
- }
- if (i == BankCode.CaretIndex - 1)
- pos = code.Length;
- }
- }
-
- BankCode.Text = code;
- BankCode.CaretIndex = pos;
-
- if (BankCode.IsFocused)
- GenerateIban();
- }
-
- private void AccountNumber_TextChanged(object sender, TextChangedEventArgs e) {
- string cc = "AT";
- string num = "";
- int pos = AccountNumber.CaretIndex;
-
- if (cc == "AT") {
- for (int i = 0, v = 0; i < AccountNumber.Text.Length && v < 11; i++) {
- char ch = AccountNumber.Text[i];
- if (Char.IsLetterOrDigit(ch) && Char.IsAscii(ch)) {
- v++;
- num += ch;
- }
- if (i == AccountNumber.CaretIndex - 1)
- pos = num.Length;
- }
- }
-
- AccountNumber.Text = num;
- AccountNumber.CaretIndex = pos;
-
- if (AccountNumber.IsFocused)
- GenerateIban();
- }
-
- private void GenerateIban() {
- string cc = "AT";
- string iban = cc + "00";
-
- if (cc == "AT") {
- iban += BankCode.Text.PadLeft(5, '0') + AccountNumber.Text.PadLeft(11, '0');
- }
-
- // TODO calculate checksum
-
- Iban.Text = iban;
- Iban.CaretIndex = iban.Length;
- }
-
- private void GenerateBankDetails() {
- BankCode.Text = "";
- AccountNumber.Text = "";
-
- string iban = Iban.Text.Replace(" ", "");
- if (iban.Length <= 2)
- return;
-
- string cc = iban.Substring(0, 2);
- if (cc == "AT") {
- if (iban.Length > 4) {
- string bankCodeStr = iban.Substring(4, Math.Min(5, iban.Length - 4));
- if (bankCodeStr.All(Char.IsDigit)) {
- int bankCode = int.Parse(bankCodeStr);
- BankCode.Text = bankCode.ToString();
- }
- if (iban.Length > 9) {
- string accNumStr = iban.Substring(9, Math.Min(11, iban.Length - 9));
- if (accNumStr.All(Char.IsDigit)) {
- int accNum = int.Parse(accNumStr);
- AccountNumber.Text = (accNum != 0) ? accNum.ToString() : "";
- } else {
- AccountNumber.Text = accNumStr;
- }
- }
- }
- }
-
- BankCode.CaretIndex = BankCode.Text.Length;
- AccountNumber.CaretIndex = AccountNumber.Text.Length;
- }
- }
-}
diff --git a/WGneu/Windows/MainWindow.xaml b/WGneu/Windows/MainWindow.xaml
index 5d9fbbc..1b0375c 100644
--- a/WGneu/Windows/MainWindow.xaml
+++ b/WGneu/Windows/MainWindow.xaml
@@ -16,7 +16,6 @@
-
diff --git a/WGneu/Windows/MainWindow.xaml.cs b/WGneu/Windows/MainWindow.xaml.cs
index 5d1dcf2..340afd8 100644
--- a/WGneu/Windows/MainWindow.xaml.cs
+++ b/WGneu/Windows/MainWindow.xaml.cs
@@ -40,13 +40,8 @@ namespace WGneu.Windows {
base.OnClosing(e);
}
- private void Button1_Click(object sender, EventArgs e) {
- BankDetailsWindow w = new BankDetailsWindow();
- w.Show();
- }
-
private void Button2_Click(object sender, EventArgs e) {
- MemberListWindow w = new MemberListWindow();
+ var w = new MemberListWindow();
w.Show();
}