public override object GetValue(SourceGrid2.Position pos) { if (pos.Row == 1) { return("="); } else if (pos.Row == Grid.RowsCount - 1) { return("*"); } else { return(pos.Row - 2); } }
public override void SetValue(SourceGrid2.Position pos, object x) { if (pos.Column == 4) { if (pos.Row == Grid.RowsCount - 1) { data.Length = Grid.RowsCount - M; Grid.RowsCount += 1; } data.dy[pos.Row - M] = (double)x; } else { throw new IndexOutOfRangeException("invalid column index: " + pos.Column); } OnValueChanged(new SourceGrid2.PositionEventArgs(pos, this)); }
public override object GetValue(SourceGrid2.Position pos) { if (pos.Column == 4) { if (pos.Row == Grid.RowsCount - 1) { return(null); } else { return(data.dy[pos.Row - M]); } } else { throw new IndexOutOfRangeException("invalid column index: " + pos.Column); } }
public override object GetValue(SourceGrid2.Position pos) { switch (pos.Column) { case 1: return("x[n]"); case 2: return("y[n]"); case 3: return("dx[n]"); case 4: return("dy[n]"); default: throw new IndexOutOfRangeException("invalid column index: " + pos.Column); } }
public override void SetValue(SourceGrid2.Position pos, object x) { string s = (string)x; if (EmptyString(s)) { s = null; } switch (pos.Column) { case 1: data.x.source = s; Compile(); break; case 2: data.y.source = s; Compile(); break; case 3: data.dx.source = s; Compile(); break; case 4: data.dy.source = s; Compile(); break; default: throw new IndexOutOfRangeException("invalid column index: " + pos.Column); } ((DataGrid)Grid).RefreshCellStyle(); OnValueChanged(new SourceGrid2.PositionEventArgs(pos, this)); }
public override void SetValue(SourceGrid2.Position p_Position, object p_Value) { throw new ApplicationException("Cannot change this kind of cell"); }
public override object GetValue(SourceGrid2.Position p_Position) { return("n"); }
public override void SetSortMode(SourceGrid2.Position p_Position, SourceGrid2.GridSortMode p_Mode) { }
public override SourceGrid2.SortStatus GetSortStatus(SourceGrid2.Position p_Position) { return(new SourceGrid2.SortStatus(SourceGrid2.GridSortMode.None, false)); }