终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. using BPASmartClient.CustomResource.Pages.Model;
  15. namespace WPFDemo
  16. {
  17. /// <summary>
  18. /// TestData.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class TestData : Window
  21. {
  22. public TestData()
  23. {
  24. InitializeComponent();
  25. }
  26. private void Button_Click(object sender, RoutedEventArgs e)
  27. {
  28. ProductionDataHelper<DataTest>.Add(new DataTest()
  29. {
  30. data1 = new Random().Next(0, 100),
  31. data2 = new Random().Next(200, 300),
  32. data3 = new Random().Next(400, 500).ToString(),
  33. data4 = Convert.ToBoolean(new Random().Next(0, 1)),
  34. data5 = new Random().Next(600, 700)
  35. });
  36. }
  37. private void Button_Click_1(object sender, RoutedEventArgs e)
  38. {
  39. ProductionDataHelper<DataTest>.Save();
  40. }
  41. }
  42. }