| | |
| | | { |
| | | public partial class IBoxFormDataFilter : DocumentPage |
| | | { |
| | | private string startCode = "[&start&]"; |
| | | private string endCode = "[&end&]"; |
| | | private string paramCode = "[¶m&]"; |
| | | 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; |
| | |
| | | SendData?.Invoke(null, content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <param name="isBlue"></param> |
| | | public void BindData(IBoxFilterViewModel model, bool isBlue) |
| | | { |
| | | this.model = model; |
| | |
| | | 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("保存成功"); |
| | | } |
| | | |