complete login function and login window also add attached properties and helper classes for securestring

This commit is contained in:
Rene Schwarz
2021-04-03 23:52:00 +02:00
parent 077f622115
commit a42f756d78
32 changed files with 377 additions and 37 deletions

Binary file not shown.

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="ServerDashboardDB" connectionString="Server=localhost;Database=ServerDashboardDB;User Id=SA;Password=Me262HG3;"/>
</connectionStrings>
<startup>
<supportedRuntime version="v3.1.13" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -12,8 +12,8 @@
</RadialGradientBrush.GradientStops> </RadialGradientBrush.GradientStops>
</RadialGradientBrush> </RadialGradientBrush>
<BooleanToVisibilityConverter x:Key="UserNameVisibillity" /> <BooleanToVisibilityConverter x:Key="UserNameVisibillity"/>
<BooleanToVisibilityConverter x:Key="PasswordVisibillity" /> <BooleanToVisibilityConverter x:Key="PasswordVisibillity"/>
<SolidColorBrush x:Key="Background" Color="#141424"/> <SolidColorBrush x:Key="Background" Color="#141424"/>
<!--A700 Teal--> <!--A700 Teal-->
@@ -26,6 +26,8 @@
<SolidColorBrush x:Key="Yellow" Color="#FFEB3B"/> <SolidColorBrush x:Key="Yellow" Color="#FFEB3B"/>
<!--700 Yellow--> <!--700 Yellow-->
<SolidColorBrush x:Key="PressedYellow" Color="#FBC02D"/> <SolidColorBrush x:Key="PressedYellow" Color="#FBC02D"/>
<!--800 Red-->
<SolidColorBrush x:Key="ErrorRed" Color="#c62828"/>
<Style x:Key="LoginViewBorder" TargetType="{x:Type Border}"> <Style x:Key="LoginViewBorder" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#25AEA6"/> <Setter Property="BorderBrush" Value="#25AEA6"/>
@@ -141,5 +143,10 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ErrorMessage" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="Foreground" Value="{StaticResource ErrorRed}"/>
</Style>
</Application.Resources> </Application.Resources>
</Application> </Application>

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
namespace Server_Dashboard {
public abstract class BaseAttachedProperty<Parent, Property>
where Parent : BaseAttachedProperty<Parent, Property>, new() {
public event Action<DependencyObject, DependencyPropertyChangedEventArgs> ValueChanged = (sender, e) => { };
public static Parent Instance { get; private set; } = new Parent();
public static readonly DependencyProperty ValueProperty = DependencyProperty.RegisterAttached("Value", typeof(Property), typeof(BaseAttachedProperty<Parent, Property>), new PropertyMetadata(new PropertyChangedCallback(OnValuePropertyChanged)));
private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
Instance.OnValueChanged(d, e);
Instance.ValueChanged(d, e);
}
public static Property GetValue(DependencyObject d) => (Property)d.GetValue(ValueProperty);
public static void SetValue(DependencyObject d, Property value) => d.SetValue(ValueProperty, value);
public virtual void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { }
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
namespace Server_Dashboard {
public class MonitorPasswordProperty : BaseAttachedProperty<MonitorPasswordProperty, bool> {
public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) {
var passwordBox = sender as PasswordBox;
if (passwordBox == null)
return;
passwordBox.PasswordChanged -= PasswordBox_PasswordChanged;
if ((bool)e.NewValue) {
HasTextProperty.SetValue(passwordBox);
passwordBox.PasswordChanged += PasswordBox_PasswordChanged;
}
}
private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e) {
HasTextProperty.SetValue((PasswordBox)sender);
}
}
public class HasTextProperty : BaseAttachedProperty<HasTextProperty, bool> {
public static void SetValue(DependencyObject sender) {
SetValue(sender, ((PasswordBox)sender).SecurePassword.Length < 1);
}
}
}

View File

@@ -2,19 +2,37 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Reflection; using System.Reflection;
namespace Server_Dashboard { namespace Server_Dashboard {
class DatabaseHandler { public static class DatabaseHandler {
public static bool CheckLogin(string uname, string passwd) {
string valid = "False";
ConnectToDatabase(con => {
string query = "EXEC ValidateUserLogin @Username = @uname, @Password = @passwd, @Valid = @valid OUTPUT";
using (SqlCommand com = new SqlCommand(query, con)) {
com.Parameters.AddWithValue("@uname", uname);
com.Parameters.AddWithValue("@passwd", passwd);
com.Parameters.Add("@valid", SqlDbType.NVarChar, 250);
com.Parameters["@valid"].Direction = ParameterDirection.Output;
com.ExecuteNonQuery();
valid = Convert.ToString(com.Parameters["@Valid"].Value);
}
});
return Convert.ToBoolean(valid);
}
#region Private methods #region Private methods
/// <summary> /// <summary>
/// Opens a database connection /// Opens a database connection
/// </summary> /// </summary>
/// <param name="callback">Callback type SqlConnection</param> /// <param name="callback">Callback type SqlConnection</param>
/// <returns></returns> /// <returns></returns>
private SqlConnection ConnectToDatabase(Action<SqlConnection> callback) { private static SqlConnection ConnectToDatabase(Action<SqlConnection> callback) {
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Co2AuswertungDB"].ConnectionString)) { using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
try { try {
con.Open(); con.Open();
callback(con); callback(con);

View File

@@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:Server_Dashboard" xmlns:local="clr-namespace:Server_Dashboard"
x:Name="Login"
mc:Ignorable="d" mc:Ignorable="d"
Title="Server Dashboard" Height="700" Width="500" WindowStyle="None" ResizeMode="NoResize" Background="Transparent" AllowsTransparency="True"> Title="Server Dashboard" Height="700" Width="500" WindowStyle="None" ResizeMode="NoResize" Background="Transparent" AllowsTransparency="True">
<Border Style="{StaticResource LoginViewBorder}"> <Border Style="{StaticResource LoginViewBorder}">
@@ -15,7 +16,8 @@
<RowDefinition Height="80"/> <RowDefinition Height="80"/>
<RowDefinition Height="80"/> <RowDefinition Height="80"/>
<RowDefinition Height="80"/> <RowDefinition Height="80"/>
<RowDefinition Height=".5*"/> <RowDefinition Height="30"/>
<RowDefinition Height=".4*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown"> <i:EventTrigger EventName="MouseDown">
@@ -61,11 +63,12 @@
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Height="30" Source="Assets/Images/userpasswd.png"/> <Image Grid.Column="0" Height="30" Source="Assets/Images/userpasswd.png"/>
<TextBlock x:Name="PasswordHint" Text="Password" Style="{StaticResource LoginFormTooltip}" Grid.Column="1" IsHitTestVisible="False"/> <TextBlock Visibility="{Binding ElementName=Password, Path=(local:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint" Text="Password" Style="{StaticResource LoginFormTooltip}" Grid.Column="1" IsHitTestVisible="False"/>
<PasswordBox Grid.Column="1" x:Name="Password" Style="{StaticResource LoginFormPassword}"/> <PasswordBox local:MonitorPasswordProperty.Value="True" Grid.Column="1" x:Name="Password" Style="{StaticResource LoginFormPassword}"/>
</Grid> </Grid>
</Border> </Border>
<Button Command="{Binding LoginCommand}" Grid.Row="4" Style="{StaticResource LoginFormButton}" Content="Login" Cursor="Hand"/> <Button Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=Login}" Grid.Row="4" Style="{StaticResource LoginFormButton}" Content="Login" Cursor="Hand"/>
<TextBlock Style="{StaticResource ErrorMessage}" Text="{Binding ErrorText}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="5"/>
</Grid> </Grid>
</Border> </Border>
</Window> </Window>

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Security;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
@@ -6,10 +7,13 @@ namespace Server_Dashboard {
/// <summary> /// <summary>
/// Interaction logic for LoginWindow.xaml /// Interaction logic for LoginWindow.xaml
/// </summary> /// </summary>
public partial class LoginWindow : Window { public partial class LoginWindow : Window, IHavePassword {
public LoginWindow() { public LoginWindow() {
InitializeComponent(); InitializeComponent();
DataContext = new LoginViewModel(); DataContext = new LoginViewModel();
} }
public SecureString SecurePassword => Password.SecurePassword;
} }
} }

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace Server_Dashboard {
public static class SecureStringHelpers {
public static string Unsecure(this SecureString secureString) {
if (secureString == null)
return string.Empty;
var unmanagedString = IntPtr.Zero;
try {
unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(secureString);
return Marshal.PtrToStringUni(unmanagedString);
} finally {
Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString);
}
}
}
}

View File

@@ -12,11 +12,6 @@
<None Remove="Assets\Images\userpasswd.png" /> <None Remove="Assets\Images\userpasswd.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="AttachedProperty\" />
<Folder Include="Views\" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.31" /> <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.31" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" /> <PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
@@ -27,4 +22,8 @@
<Resource Include="Assets\Images\userpasswd.png" /> <Resource Include="Assets\Images\userpasswd.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Views\" />
</ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Security;
using System.Text;
namespace Server_Dashboard {
public interface IHavePassword {
SecureString SecurePassword { get; }
}
}

View File

@@ -1,15 +1,62 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security;
using System.Text; using System.Text;
using System.Windows.Input;
namespace Server_Dashboard { namespace Server_Dashboard {
class LoginViewModel { class LoginViewModel : BaseViewModel {
private string password;
public string Password { private string username;
get { return password; }
set { password = value; } public string Username {
get { return username; }
set {
if (username != value)
username = value;
OnPropertyChanged(nameof(username));
}
} }
private string errorText;
public string ErrorText {
get { return errorText; }
set {
if (errorText != value)
errorText = value;
OnPropertyChanged(nameof(errorText));
}
}
public LoginViewModel() {
LoginCommand = new RelayCommand(Login);
}
public ICommand LoginCommand { get; set; }
private void Login(object parameter) {
if (!String.IsNullOrWhiteSpace(Username) && !String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
if (DatabaseHandler.CheckLogin(Username, (parameter as IHavePassword).SecurePassword.Unsecure())) {
Console.WriteLine();
} else {
ErrorText = "Username or password is wrong.";
return;
}
} else if (String.IsNullOrWhiteSpace(Username) && String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
ErrorText = "Please provide a username and password";
return;
}
if (String.IsNullOrWhiteSpace(Username)) {
ErrorText = "Username cannot be empty.";
return;
}
if (String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
ErrorText = "Password cannot be empty.";
return;
}
ErrorText = "";
}
} }
} }

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="ServerDashboardDB" connectionString="Server=localhost;Database=ServerDashboardDB;User Id=SA;Password=Me262HG3;"/>
</connectionStrings>
<startup>
<supportedRuntime version="v3.1.13" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "977B0ABA5D21CA80041E32A932A206A161E41C09" #pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "74B190EC288932EF98E3D09F645AFA4D89DB749F"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "977B0ABA5D21CA80041E32A932A206A161E41C09" #pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "74B190EC288932EF98E3D09F645AFA4D89DB749F"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.

View File

@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

View File

@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BCF5079F8AC1784378A490329B2D27B8A3CCECFD" #pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DF7FEA542AE21C1D71DCD21AA55E8BDD50DAC57A"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -47,7 +47,15 @@ namespace Server_Dashboard {
public partial class LoginWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class LoginWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 53 "..\..\..\LoginWindow.xaml" #line 8 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal Server_Dashboard.LoginWindow Login;
#line default
#line hidden
#line 55 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox UserName; internal System.Windows.Controls.TextBox UserName;
@@ -55,7 +63,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 64 "..\..\..\LoginWindow.xaml" #line 66 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock PasswordHint; internal System.Windows.Controls.TextBlock PasswordHint;
@@ -63,7 +71,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 65 "..\..\..\LoginWindow.xaml" #line 67 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.PasswordBox Password; internal System.Windows.Controls.PasswordBox Password;
@@ -91,6 +99,13 @@ namespace Server_Dashboard {
#line hidden #line hidden
} }
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
return System.Delegate.CreateDelegate(delegateType, this, handler);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
@@ -101,12 +116,15 @@ namespace Server_Dashboard {
switch (connectionId) switch (connectionId)
{ {
case 1: case 1:
this.UserName = ((System.Windows.Controls.TextBox)(target)); this.Login = ((Server_Dashboard.LoginWindow)(target));
return; return;
case 2: case 2:
this.PasswordHint = ((System.Windows.Controls.TextBlock)(target)); this.UserName = ((System.Windows.Controls.TextBox)(target));
return; return;
case 3: case 3:
this.PasswordHint = ((System.Windows.Controls.TextBlock)(target));
return;
case 4:
this.Password = ((System.Windows.Controls.PasswordBox)(target)); this.Password = ((System.Windows.Controls.PasswordBox)(target));
return; return;
} }

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BCF5079F8AC1784378A490329B2D27B8A3CCECFD" #pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DF7FEA542AE21C1D71DCD21AA55E8BDD50DAC57A"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -47,7 +47,15 @@ namespace Server_Dashboard {
public partial class LoginWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class LoginWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 53 "..\..\..\LoginWindow.xaml" #line 8 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal Server_Dashboard.LoginWindow Login;
#line default
#line hidden
#line 55 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox UserName; internal System.Windows.Controls.TextBox UserName;
@@ -55,7 +63,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 64 "..\..\..\LoginWindow.xaml" #line 66 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock PasswordHint; internal System.Windows.Controls.TextBlock PasswordHint;
@@ -63,7 +71,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 65 "..\..\..\LoginWindow.xaml" #line 67 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.PasswordBox Password; internal System.Windows.Controls.PasswordBox Password;
@@ -91,6 +99,13 @@ namespace Server_Dashboard {
#line hidden #line hidden
} }
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
return System.Delegate.CreateDelegate(delegateType, this, handler);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
@@ -101,12 +116,15 @@ namespace Server_Dashboard {
switch (connectionId) switch (connectionId)
{ {
case 1: case 1:
this.UserName = ((System.Windows.Controls.TextBox)(target)); this.Login = ((Server_Dashboard.LoginWindow)(target));
return; return;
case 2: case 2:
this.PasswordHint = ((System.Windows.Controls.TextBlock)(target)); this.UserName = ((System.Windows.Controls.TextBox)(target));
return; return;
case 3: case 3:
this.PasswordHint = ((System.Windows.Controls.TextBlock)(target));
return;
case 4:
this.Password = ((System.Windows.Controls.PasswordBox)(target)); this.Password = ((System.Windows.Controls.PasswordBox)(target));
return; return;
} }

View File

@@ -1 +1 @@
2d00fed8572cd61607e336f9293a29754e9405e3 f1717d53be58eb9a59391431391201bfbf17cc09

View File

@@ -26,3 +26,5 @@ C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcor
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\LoginWindow.g.cs C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\LoginWindow.g.cs
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\LoginWindow.baml C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\LoginWindow.baml
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\bin\Debug\netcoreapp3.1\Microsoft.Xaml.Behaviors.dll C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\bin\Debug\netcoreapp3.1\Microsoft.Xaml.Behaviors.dll
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\GeneratedInternalTypeHelper.g.cs
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\bin\Debug\netcoreapp3.1\Server Dashboard.dll.config

View File

@@ -12,7 +12,7 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
1-1623698816 1-1623698816
11-1758370662 151761447773
194-1159729825 194-1159729825
LoginWindow.xaml; LoginWindow.xaml;

View File

@@ -12,7 +12,7 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
1-1623698816 1-1623698816
13937269364 17162120503
194-1159729825 194-1159729825
LoginWindow.xaml; LoginWindow.xaml;