SetGREditForm.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using DevExpress.XtraEditors;
  2. using Ips.Library.DxpLib;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows.Forms;
  12. namespace Ips.Sps.Sigs
  13. {
  14. public partial class SetGREditForm : DevExpress.XtraEditors.XtraForm
  15. {
  16. public SetGREditForm()
  17. {
  18. InitializeComponent();
  19. }
  20. public static double FreqGR;
  21. public static double BandWidthGR;
  22. private void SetGREditForm_Load(object sender, EventArgs e)
  23. {
  24. txtFreqGR.Text = FreqGR.ToString();
  25. txtBandWidthGR.Text = BandWidthGR.ToString();
  26. }
  27. private void btnSave_Click(object sender, EventArgs e)
  28. {
  29. if (double.TryParse(txtFreqGR.Text, out double freq))
  30. {
  31. FreqGR = freq;
  32. }
  33. else
  34. {
  35. MsgHelper.ShowError("请输入正确的干扰频点!");
  36. return;
  37. }
  38. if (double.TryParse(txtBandWidthGR.Text, out double bw))
  39. {
  40. BandWidthGR = bw;
  41. }
  42. else
  43. {
  44. MsgHelper.ShowError("请输入正确的干扰带宽!");
  45. return;
  46. }
  47. this.DialogResult = DialogResult.OK;
  48. Close();
  49. }
  50. }
  51. }