AOCtrl.cs 737 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace Aitex.Core.Backend
  10. {
  11. public partial class AOCtrl : UserControl
  12. {
  13. public AOCtrl()
  14. {
  15. InitializeComponent();
  16. }
  17. public void SetName(string name)
  18. {
  19. labelName.Text = name;
  20. }
  21. /// <summary>
  22. /// set value
  23. /// </summary>
  24. /// <param name="value"></param>
  25. public void SetValue(float value)
  26. {
  27. string disp = String.Format("{0:f2}", value);
  28. if (textBoxCurr.Text != disp)
  29. textBoxCurr.Text = disp;
  30. }
  31. }
  32. }