Add DashboardWindow, controlls to close the login than open the dashboard

This commit is contained in:
Rene Schwarz
2021-04-04 21:22:13 +02:00
parent 5a1681498a
commit 73f864ea20
49 changed files with 729 additions and 24 deletions

View File

@@ -27,4 +27,17 @@ namespace Server_Dashboard {
SetValue(sender, ((PasswordBox)sender).SecurePassword.Length < 1);
}
}
public class CloseProperty : BaseAttachedProperty<CloseProperty, bool> {
public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) {
if(sender is Window window) {
window.Loaded += (s, e) => {
if(window.DataContext is IWindowHelper wh) {
wh.Close += () => {
window.Close();
};
}
};
}
}
}
}