MainWindow.xaml.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.Navigation;
  14. using System.Windows.Shapes;
  15. namespace CollaborativePlatformMain
  16. {
  17. /// <summary>
  18. /// MainWindow.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class MainWindow : Window
  21. {
  22. public MainWindow()
  23. {
  24. InitializeComponent();
  25. this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
  26. }
  27. /// <summary>
  28. /// 登陆
  29. /// </summary>
  30. /// <param name="sender"></param>
  31. /// <param name="e"></param>
  32. private void LoginLayButton_Click(object sender, RoutedEventArgs e)
  33. {
  34. ////获取用户名和密码
  35. //string userName = tb_userName.Text;
  36. //string userPwd = tb_userPwd.Text;
  37. ////验证登陆
  38. //if (LoginUtil.VerifyLoginMethod(userName, userPwd))
  39. //{
  40. // //HomepageForm homepageForm = new HomepageForm();
  41. // //homepageForm.Show();
  42. // //this.Close();
  43. //}
  44. //else
  45. //{
  46. // //登陆事变
  47. // MessageBox.Show("用户名或密码错误!", "提示", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.None);
  48. //}
  49. }
  50. /// <summary>
  51. /// 注册
  52. /// </summary>
  53. /// <param name="sender"></param>
  54. /// <param name="e"></param>
  55. private void RegisterLayButton_Click(object sender, RoutedEventArgs e)
  56. {
  57. }
  58. /// <summary>
  59. /// 临时登陆按下
  60. /// </summary>
  61. /// <param name="sender"></param>
  62. /// <param name="e"></param>
  63. private void TemporaryLogin_Click(object sender, RoutedEventArgs e)
  64. {
  65. sp_Login.Visibility = Visibility.Collapsed;
  66. sp_Register.Visibility = Visibility.Collapsed;
  67. sp_temporaryLogin.Visibility = Visibility.Visible;
  68. }
  69. /// <summary>
  70. /// 临时登陆-确定
  71. /// </summary>
  72. /// <param name="sender"></param>
  73. /// <param name="e"></param>
  74. private void TemporaryLogin2_Click(object sender, RoutedEventArgs e)
  75. {
  76. List<string> temporaryLogins = new List<string>() { "550632" };
  77. if (!string.IsNullOrEmpty(tb_InvitationCode.Text) && temporaryLogins.Contains(tb_InvitationCode.Text))
  78. {
  79. //HomepageForm homepageForm = new HomepageForm();
  80. //homepageForm.Show();
  81. //this.Close();
  82. }
  83. else
  84. {
  85. //登陆事变
  86. MessageBox.Show("邀请码错误!", "提示", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.None);
  87. }
  88. }
  89. }
  90. }