|
@@ -24,6 +24,31 @@ namespace InteractiveKiosk
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
}
|
|
|
+ //public void TextBox_GotFocus(object sender, RoutedEventArgs e)
|
|
|
+ //{
|
|
|
+ // TextBox tb = (TextBox)sender;
|
|
|
+ // tb.Text = string.Empty;
|
|
|
+ // tb.GotFocus -= TextBox_GotFocus;
|
|
|
+ //}
|
|
|
+
|
|
|
+ private const string defaultText = "Логин";
|
|
|
+ private const string defaultText1 = "Пароль";
|
|
|
+
|
|
|
+ private void TextBox_GotFocus(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ username.Text = username.Text == defaultText ?
|
|
|
+ string.Empty : username.Text;
|
|
|
+ password.Password = password.Password == defaultText1 ?
|
|
|
+ string.Empty : password.Password;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void TextBox_LostFocus(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ username.Text = username.Text == string.Empty ?
|
|
|
+ defaultText : username.Text;
|
|
|
+ password.Password = password.Password == string.Empty ?
|
|
|
+ defaultText1 : password.Password;
|
|
|
+ }
|
|
|
|
|
|
private void LoginButton(object sender, RoutedEventArgs e)
|
|
|
{
|