| | |
| | | InitializeComponent(); |
| | | this.gridView1.SetDefaultEditView(); |
| | | this.gridView1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; |
| | | |
| | | |
| | | this.repImgCmbFeatType.Items.Add("三次拟合", Yw.Ahart.eFeatType.Cubic, -1); |
| | | |
| | | this.repImgCmbEditModel.Items.Add("鼠标", 0, -1); |
| | | this.repImgCmbEditModel.Items.Add("键盘", 1, -1); |
| | | |
| | | this.universalEditChart1.DefinePointChangedEvent += UniversalEditChart1_DefinePointChangedEvent; |
| | | this.universalEditChart1.SelectedPointIndexChangedEvent += (index) => |
| | | { |
| | | this.gridView1.FocusedRowHandle = index; |
| | | }; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | _def_pt_list.Add(new Geometry.Point2d(x, y)); |
| | | this.bindingSource1.ResetBindings(false); |
| | | this.gridView1.FocusedRowHandle = _def_pt_list.Count - 1; |
| | | SetChart(_feat_type, _def_pt_list); |
| | | } |
| | | |
| | |
| | | //删除点 |
| | | private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_def_pt_list == null || !_def_pt_list.Any()) |
| | | return; |
| | | if (_def_pt_list == null || _def_pt_list.Count <= 4) |
| | | return; |
| | | var row = this.gridView1.GetCurrentViewModel(_def_pt_list); |
| | | if (row == null) |
| | | return; |
| | | _def_pt_list.Remove(row); |
| | | this.bindingSource1.ResetBindings(false); |
| | | SetChart(_feat_type, _def_pt_list); |
| | | SetChart(_feat_type, _def_pt_list); |
| | | } |
| | | |
| | | /// <summary> |