コード例 #1
0
 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);
         }
     });
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: SpanTickSpacing.cs プロジェクト: Altaxo/Altaxo
		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);
			}
		}
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: AngularScale.cs プロジェクト: olesar/Altaxo
 public override void OnUserZoomed(Data.AltaxoVariant newZoomOrg, Data.AltaxoVariant newZoomEnd)
 {
     // Do nothing - zooming is not supported
 }
コード例 #7
0
ファイル: AltaxoTableConnector.cs プロジェクト: Altaxo/Altaxo
		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);
				};
		}
コード例 #8
0
 public override void OnUserZoomed(Data.AltaxoVariant newZoomOrg, Data.AltaxoVariant newZoomEnd)
 {
 }