qin
2025-03-18 eeb667905a9ee2d04aa9a3762c122f2c9ecd90d8
WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.cs
@@ -9,38 +9,21 @@
{
    public partial class IBoxFormDataFilter : DocumentPage
    {
        private string startCode = "[&start&]";
        private string endCode = "[&end&]";
        private string paramCode = "[&param&]";
        private string getfilterCode = "getfilter";
        private string savefilterCode = "savefilter";
        public IBoxFormDataFilter()
        {
            InitializeComponent();
            imageComboBoxEdit1.EditValue = "Flow";
            InitChart();
        }
        private void SetOrder(string order)
        public void HideButton()
        {
            var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries);
            if (smsg.Length < 2)
            {
                return;
            }
            switch (smsg[0].Trim())
            {
                case "datadownload":
                    //WaitFrmHelper.HideWaitForm();
                    break;
            }
            simpleButton1.Visible = simpleButton2.Visible = simpleButton3.Visible = simpleButton4.Visible = false;
        }
        private void EboxFormDataFilter_Load(object sender, EventArgs e)
        {
            SendText(startCode + getfilterCode + paramCode + endCode);
            SendText(IBoxHelper.startCode + IBoxHelper.getfilterCode + IBoxHelper.paramCode + IBoxHelper.endCode);
        }
        public event EventHandler<string> SendData;
@@ -50,6 +33,11 @@
            SendData?.Invoke(null, content);
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="model"></param>
        /// <param name="isBlue"></param>
        public void BindData(IBoxFilterViewModel model, bool isBlue)
        {
            this.model = model;
@@ -169,33 +157,7 @@
            model.IsFlowFilter = checkEditIsFlow.Checked;
            model.IsPressFilter = checkEditIsPress.Checked;
            SetValue();
            //var uv= imageComboBoxEdit1.EditValue.ToString();
            //if (model.IsFlowFilter)
            //{
            //    model.FlowFilterConfig = new EboxFilterConfigViewModel()
            //    {
            //        IsControlInput = checkEditIsControlInput.Checked,
            //        RValue = double.Parse(textEditRValue.Text),
            //        QValue = double.Parse(textEditQValue.Text),
            //        AValue = double.Parse(textEditAValue.Text),
            //        HValue = double.Parse(textEditHValue.Text),
            //        ControlInputValue = double.Parse(textEditControlInputValue.Text)
            //    };
            //}
            //if (model.IsPressFilter)
            //{
            //    model.PressFilterConfig = new EboxFilterConfigViewModel()
            //    {
            //        IsControlInput = checkEditIsControlInput.Checked,
            //        RValue = double.Parse(textEditRValue.Text),
            //        QValue = double.Parse(textEditQValue.Text),
            //        AValue = double.Parse(textEditAValue.Text),
            //        HValue = double.Parse(textEditHValue.Text),
            //        ControlInputValue = double.Parse(textEditControlInputValue.Text)
            //    };
            //}
            SendText(startCode + savefilterCode + paramCode + JsonHelper.Object2Json(model) + endCode);
            SendText(IBoxHelper.startCode + IBoxHelper.savefilterCode + IBoxHelper.paramCode + JsonHelper.Object2Json(model) + IBoxHelper.endCode);
            MessageBoxHelper.ShowInfo("保存成功");
        }