| | |
| | | using Gs.DevApp.Entity; |
| | | using DevExpress.Utils.MVVM.Services; |
| | | using DevExpress.XtraLayout.Customization; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.QC |
| | |
| | | //编辑事件 |
| | | gvMx1.CellValueChanged += GvMx1_CellValueChanged; |
| | | //取消不符合条件的编辑 |
| | | // gvMx1.ShowingEditor += GvMx1_ShowingEditor; |
| | | gvMx1.ShowingEditor += GvMx1_ShowingEditor; |
| | | //禁用样本数之外的单元格且改变颜色 |
| | | gvMx1.CustomDrawCell += GvMx1_CustomDrawCell; |
| | | getModel(); |
| | | |
| | | this.FormClosing += (s, e) => |
| | | { |
| | | textEdit1.Focus(); |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 判断单元格的编辑性 |
| | |
| | | bool _bl = ckCol(e.Column.FieldName, _maxYbs); |
| | | if (_bl) |
| | | { |
| | | e.Appearance.BackColor = Color.Azure; |
| | | e.Appearance.BackColor = Color.LightBlue; |
| | | e.Appearance.ForeColor = Color.Blue; |
| | | e.Column.MinWidth = 50; |
| | | } |
| | | else |
| | |
| | | object value = gvMx1.GetRowCellValue(e.RowHandle, e.Column + "jg"); |
| | | if (value != null && value.ToString() == strBhg) |
| | | { |
| | | e.Appearance.ForeColor = Color.White; |
| | | e.Appearance.BackColor = Color.Red; |
| | | }; |
| | | e.Appearance.ForeColor = Color.White; |
| | | } |
| | | ; |
| | | } |
| | | } |
| | | |