public static Action <Altaxo.Data.DataColumn, int, object> GetColumnItemSetter(Type oledbType) { return((col, idx, obj) => { if (null == obj || obj == System.DBNull.Value) { col.SetElementEmpty(idx); } else { col[idx] = new Data.AltaxoVariant(obj); } }); }
public override void FinalProcessScaleBoundaries(Altaxo.Data.AltaxoVariant org, Altaxo.Data.AltaxoVariant end, Altaxo.Graph.Scales.Scale scale) { _org = org; _end = end; try { if (_showRatioEndOrg) { _span = end / org; } else { _span = end - org; } } catch (Exception) { _span = new Data.AltaxoVariant(string.Empty); } }
void IUnboundNumericScaleRescaleConditions.SetUserParameters(BoundaryRescaling orgRescaling, BoundariesRelativeTo orgRelativeTo, Data.AltaxoVariant orgValue, BoundaryRescaling endRescaling, BoundariesRelativeTo endRelativeTo, Data.AltaxoVariant endValue) { double orgV, endV; if (orgValue.CanConvertedToDouble) { orgV = orgValue.ToDouble(); } else { throw new InvalidOperationException("Can not convert orgValue to a double value."); } if (orgValue.CanConvertedToDouble) { endV = endValue.ToDouble(); } else { throw new InvalidOperationException("Can not convert endValue to a double value."); } SetUserParameters(orgRescaling, orgRelativeTo, orgV, endRescaling, endRelativeTo, endV); }
public override void FinalProcessScaleBoundaries(Altaxo.Data.AltaxoVariant org, Altaxo.Data.AltaxoVariant end, Altaxo.Graph.Scales.Scale scale) { _org = org; _end = end; try { if (_showRatioEndOrg) _span = end / org; else _span = end - org; } catch (Exception) { _span = new Data.AltaxoVariant(string.Empty); } }
void IUnboundNumericScaleRescaleConditions.SetUserParameters(BoundaryRescaling orgRescaling, BoundariesRelativeTo orgRelativeTo, Data.AltaxoVariant orgValue, BoundaryRescaling endRescaling, BoundariesRelativeTo endRelativeTo, Data.AltaxoVariant endValue) { long orgV, endV; DateTimeKind orgK, endK; if (orgValue.IsType(Data.AltaxoVariant.Content.VDateTime)) { var dt = orgValue.ToDateTime(); orgV = dt.Ticks; orgK = dt.Kind; } else if (orgValue.CanConvertedToDouble) { double v = orgValue.ToDouble(); orgV = (long)(v * 1E7); orgK = DateTimeKind.Utc; } else { throw new InvalidOperationException("Can not convert orgValue to either a DateTime or a double value."); } if (endValue.IsType(Data.AltaxoVariant.Content.VDateTime)) { var dt = endValue.ToDateTime(); endV = dt.Ticks; endK = dt.Kind; } else if (orgValue.CanConvertedToDouble) { double v = endValue.ToDouble(); endV = (long)(v * 1E7); endK = DateTimeKind.Utc; } else { throw new InvalidOperationException("Can not convert endValue to either a DateTime or a double value."); } SetUserParameters(orgRescaling, orgRelativeTo, orgV, orgK, endRescaling, endRelativeTo, endV, endK); }
public override void OnUserZoomed(Data.AltaxoVariant newZoomOrg, Data.AltaxoVariant newZoomEnd) { // Do nothing - zooming is not supported }
public static Action<Altaxo.Data.DataColumn, int, object> GetColumnItemSetter(Type oledbType) { return (col, idx, obj) => { if (null == obj || obj == System.DBNull.Value) col.SetElementEmpty(idx); else col[idx] = new Data.AltaxoVariant(obj); }; }
public override void OnUserZoomed(Data.AltaxoVariant newZoomOrg, Data.AltaxoVariant newZoomEnd) { }