Regist.xaml.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace nukakto
  15. {
  16. /// <summary>
  17. /// Логика взаимодействия для Regist.xaml
  18. /// </summary>
  19. public partial class Regist : Window
  20. {
  21. public Regist()
  22. {
  23. InitializeComponent();
  24. }
  25. private void HedeText(object sender, MouseEventArgs e)
  26. {
  27. Password.IsReadOnly = false;
  28. Password.Text = ""; // Clear textBox
  29. }
  30. private void LeaveCursor(object sender, MouseEventArgs e)
  31. {
  32. if (Password.Text == "")
  33. {
  34. Password.Text = "Придумайте пароль!";
  35. Password.IsReadOnly = true;
  36. }
  37. }
  38. private void Emailhade(object sender, MouseEventArgs e)
  39. {
  40. Email.IsReadOnly = false;
  41. Email.Text = "";
  42. }
  43. private void LeaveEmail(object sender, MouseEventArgs e)
  44. {
  45. if (Email.Text == "")
  46. {
  47. Email.Text = "Введите электроную почту";
  48. Email.IsReadOnly = true;
  49. }
  50. }
  51. private void MiddleHede(object sender, MouseEventArgs e)
  52. {
  53. Middle.IsReadOnly = false;
  54. Middle.Text = "";
  55. }
  56. private void LeaveMiddle(object sender, MouseEventArgs e)
  57. {
  58. if (Middle.Text == "")
  59. {
  60. Middle.Text = "Отчество";
  61. Middle.IsReadOnly = true;
  62. }
  63. }
  64. private void FirstHede(object sender, MouseEventArgs e)
  65. {
  66. First.IsReadOnly = false;
  67. First.Text = "";
  68. }
  69. private void LeaveFirst(object sender, MouseEventArgs e)
  70. {
  71. if (First.Text == "")
  72. {
  73. First.Text = "Имя";
  74. First.IsReadOnly = true;
  75. }
  76. }
  77. private void LastHede(object sender, MouseEventArgs e)
  78. {
  79. Last.IsReadOnly = false;
  80. Last.Text = "";
  81. }
  82. private void LeaveLast(object sender, MouseEventArgs e)
  83. {
  84. if (Last.Text == "")
  85. {
  86. Last.Text = "Фамилия";
  87. Last.IsReadOnly = true;
  88. }
  89. }
  90. private void Button_Click(object sender, RoutedEventArgs e)
  91. {
  92. }
  93. }
  94. }