| | |
| | | { |
| | | public partial class IBoxFormDataFilter : DocumentPage |
| | | { |
| | | |
| | | public IBoxFormDataFilter() |
| | | { |
| | | InitializeComponent(); |
| | | imageComboBoxEdit1.EditValue = "Flow"; |
| | | InitChart(); |
| | | } |
| | | |
| | | public void HideButton() |
| | | { |
| | | //simpleButton1.Visible = simpleButton2.Visible = simpleButton3.Visible = simpleButton4.Visible = false; |
| | | layoutControlItem7.Visibility = layoutControlItem9.Visibility = layoutControlItem8.Visibility = layoutControlItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
| | | layoutControlItem7.Visibility = layoutControlItem9.Visibility = layoutControlItem8.Visibility = layoutControlItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
| | | } |
| | | |
| | | private void EboxFormDataFilter_Load(object sender, EventArgs e) |
| | | { |
| | | SendText(IBoxHelper.startCode + IBoxHelper.getfilterCode + IBoxHelper.paramCode + IBoxHelper.endCode); |
| | | } |
| | | |
| | | public event EventHandler<string> SendData; |
| | | |
| | | private void SendText(string content) |
| | | { |
| | | if (SendData != null) |
| | | { |
| | | SendData?.Invoke(null, content); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | checkEditIsPress.Checked = model.IsPressFilter; |
| | | imageComboBoxEdit1_SelectedIndexChanged(null, null); |
| | | } |
| | | |
| | | private Series _seriesOld, _seriesNew; |
| | | List<TimeValue> timeValuesOld_csv = new List<TimeValue>(); |
| | | List<TimeValue> timeValuesNew_csv = new List<TimeValue>(); |
| | | FilterKalman filterKalman = null; |
| | | private List<TimeValue> timeValuesOld_csv = new List<TimeValue>(); |
| | | private List<TimeValue> timeValuesNew_csv = new List<TimeValue>(); |
| | | private FilterKalman filterKalman = null; |
| | | |
| | | private void InitChart() |
| | | { |
| | |
| | | diag.ZoomingOptions.ZoomInMouseAction.ModifierKeys = ChartModifierKeys.None; |
| | | diag.EnableAxisXZooming = true; |
| | | diag.EnableAxisXScrolling = true; |
| | | |
| | | } |
| | | |
| | | private void ClearChart() |
| | | public void ClearChart() |
| | | { |
| | | this.chartControl1.BeginInit(); |
| | | |
| | |
| | | }; |
| | | } |
| | | } |
| | | |
| | | private void simpleButton2_Click_1(object sender, EventArgs e) |
| | | { |
| | | ReSet(); |
| | |
| | | var QValue = double.Parse(textEditQValue.Text); |
| | | var AValue = double.Parse(textEditAValue.Text); |
| | | var HValue = double.Parse(textEditHValue.Text); |
| | | |
| | | |
| | | SetValue(); |
| | | |
| | |
| | | //_seriesNew.BindToData(timeValuesNew_csv, "Time", "Value"); |
| | | this.chartControl1.EndInit(); |
| | | } |
| | | IBoxFilterViewModel model = new IBoxFilterViewModel(); |
| | | |
| | | private IBoxFilterViewModel model = new IBoxFilterViewModel(); |
| | | |
| | | private void simpleButton4_Click(object sender, EventArgs e) |
| | | { |
| | | Save(); |
| | | Save(); |
| | | } |
| | | |
| | | public void Save() |
| | |
| | | checkEditIsControlInput.Checked = model.FlowFilterConfig.IsControlInput; |
| | | } |
| | | break; |
| | | |
| | | case "Press": |
| | | if (model.PressFilterConfig != null) |
| | | { |
| | |
| | | public void Import() |
| | | { |
| | | #region Load |
| | | |
| | | ClearChart(); |
| | | |
| | | var dlg = new OpenFileDialog(); |
| | |
| | | continue; |
| | | var timeValue = new TimeValue(time, value); |
| | | timeValuesOld_csv.Add(timeValue); |
| | | |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | |
| | | default: |
| | | { |
| | | WaitFormHelper.HideWaitForm(); |
| | |
| | | break; |
| | | } |
| | | WaitFormHelper.HideWaitForm(); |
| | | #endregion |
| | | |
| | | #endregion Load |
| | | |
| | | if (timeValuesOld_csv.Count < 1) |
| | | { |