|
@@ -32,6 +32,32 @@ namespace InteractiveKiosk
|
|
// tb.GotFocus -= TextBox_GotFocus;
|
|
// tb.GotFocus -= TextBox_GotFocus;
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
+ private void username_TextChanged(object sender, RoutedEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ if (username.Text == "Логин")
|
|
|
|
+ {
|
|
|
|
+ username.Foreground = Brushes.Gray;
|
|
|
|
+ }
|
|
|
|
+ else if (username.Text == "")
|
|
|
|
+ {
|
|
|
|
+ username.Foreground = Brushes.Black;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void password_TextChanged(object sender, RoutedEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ if (password.Text == "Пароль")
|
|
|
|
+ {
|
|
|
|
+ password.Foreground = Brushes.Gray;
|
|
|
|
+ }
|
|
|
|
+ else if (password.Text == "")
|
|
|
|
+ {
|
|
|
|
+ password.Foreground = Brushes.Black;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
private const string defaultText = "Логин";
|
|
private const string defaultText = "Логин";
|
|
private const string defaultText1 = "Пароль";
|
|
private const string defaultText1 = "Пароль";
|
|
|
|
|
|
@@ -39,8 +65,6 @@ namespace InteractiveKiosk
|
|
{
|
|
{
|
|
username.Text = username.Text == defaultText ?
|
|
username.Text = username.Text == defaultText ?
|
|
string.Empty : username.Text;
|
|
string.Empty : username.Text;
|
|
- username.Foreground = Brushes.Gray;
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private void Password_GotFocus(object sender, RoutedEventArgs e)
|
|
private void Password_GotFocus(object sender, RoutedEventArgs e)
|
|
@@ -51,9 +75,9 @@ namespace InteractiveKiosk
|
|
|
|
|
|
private void Username_LostFocus(object sender, RoutedEventArgs e)
|
|
private void Username_LostFocus(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
- username.Text = username.Text == string.Empty ?
|
|
|
|
|
|
+ username.Text = username.Text == string.Empty ?
|
|
defaultText : username.Text;
|
|
defaultText : username.Text;
|
|
- username.Foreground = Brushes.Gray;
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
private void Password_LostFocus(object sender, RoutedEventArgs e)
|
|
private void Password_LostFocus(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|