Beispiel #1
0
        // write
        protected override void OnCellValueChanged(DataGridViewCellEventArgs e)
        {
            base.OnCellValueChanged(e);
            try {
                if (ModList == null)
                {
                    return;
                }
                var plugin = ModList.Filtered[e.RowIndex];
                var cell   = Rows[e.RowIndex].Cells[e.ColumnIndex];
                var col    = cell.OwningColumn;

                if (col == COrder)
                {
                    int newVal = Int32.Parse(cell.Value as string);
                    var p      = ModList.Filtered[e.RowIndex];
                    ModList.MoveItem(p, newVal);
                    RefreshModList();
                }
                else if (col == CEnabled)
                {
                    plugin.IsEnabledPending = (bool)cell.Value;
                }
                else if (col == CIsIncluded)
                {
                    plugin.IsIncludedPending = (bool)cell.Value;
                }
                else
                {
                    return;
                }
                LoadOrderWindow.Instance.UpdateStatus();
            } catch (Exception ex) {
                Log.Exception(ex);
            }
        }