Form_Version.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace YGUV.Config.FormConfig
  11. {
  12. public partial class Form_Version : Form
  13. {
  14. public Form_Version(bool isread)
  15. {
  16. InitializeComponent();
  17. this.Load += Form_Version_Load;
  18. if (isread)
  19. {
  20. this.textBox1.ReadOnly = true;
  21. this.richTextBox1.ReadOnly = true;
  22. }
  23. else
  24. {
  25. this.textBox1.ReadOnly = false;
  26. this.richTextBox1.ReadOnly = false;
  27. }
  28. }
  29. private void Form_Version_Load(object sender, EventArgs e)
  30. {
  31. textBox1.DataBindings.Add("Text", YG.DeviceConfig.Instance.version, "Version");
  32. richTextBox1.DataBindings.Add("Text", YG.DeviceConfig.Instance.version, "VersionDescription");
  33. }
  34. }
  35. }