终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

58 lines
1.5 KiB

  1. using BPA.Helper;
  2. using BPASmart.Model;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Shapes;
  16. namespace BPASmart.ConfigurationSoftware
  17. {
  18. /// <summary>
  19. /// NewPageView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class NewPageView : Window
  22. {
  23. public NewPageView()
  24. {
  25. InitializeComponent();
  26. }
  27. private void Button_Click(object sender, RoutedEventArgs e)
  28. {
  29. this.DialogResult = false;
  30. this.Close();
  31. }
  32. private void Button_Click_1(object sender, RoutedEventArgs e)
  33. {
  34. if (this.pageName.Text.Trim().Length > 0)
  35. {
  36. if (!Json<ProjectModel>.Data.Pages.ContainsKey(this.pageName.Text.Trim()))
  37. {
  38. this.DialogResult = true;
  39. ActionManage.GetInstance.Send("AddPage", this.pageName.Text);
  40. this.Close();
  41. }
  42. else
  43. {
  44. ErrorInfo.Text = "该页面已存在";
  45. }
  46. }
  47. else
  48. {
  49. ErrorInfo.Text = "请输入页面名称";
  50. }
  51. }
  52. }
  53. }