public virtual TDistance Distance(double X, double Y) { TDistance tdistance = new TDistance(); tdistance.X = this.fX; tdistance.Y = this.fY; tdistance.dX = Math.Abs(X - this.fX); tdistance.dY = Math.Abs(Y - this.fY); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat(this.fToolTipFormat, (object)this.fX, (object)this.fY); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return(tdistance); }
public TDistance Distance(double x, double y) { TDistance tdistance = new TDistance(); tdistance.X = this.X; tdistance.Y = this.Y; tdistance.dX = Math.Abs(x - this.X); tdistance.dY = Math.Abs(y - this.Y); StringBuilder sb = new StringBuilder(); sb.AppendFormat(this.ToolTipFormat, this.X, this.Y); tdistance.ToolTipText = sb.ToString(); return(tdistance); }
public TDistance Distance(double X, double Y) { TDistance tdistance1 = new TDistance(); foreach (TMarker tmarker in this.points) { TDistance tdistance2 = tmarker.Distance(X, Y); if (tdistance2.dX < tdistance1.dX && tdistance2.dY < tdistance1.dY) { tdistance1 = tdistance2; } } if (tdistance1 != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat(this.ToolTipFormat, this.Name, this.Title, (object)tdistance1.X, (object)tdistance1.Y); tdistance1.ToolTipText = stringBuilder.ToString(); } return(tdistance1); }
public TDistance Distance(double X, double Y) { TDistance tdistance = new TDistance(); foreach (Trade trade in (DataArray) this) { double num1 = Math.Abs(X - (double)trade.DateTime.Ticks); double num2 = Math.Abs(Y - trade.Price); if (num1 < tdistance.dX && num2 < tdistance.dY) { tdistance.dX = num1; tdistance.dY = num2; tdistance.X = (double)trade.DateTime.Ticks; tdistance.Y = trade.Price; } } if (tdistance.dX == double.MaxValue || tdistance.dY == double.MaxValue) return (TDistance)null; DateTime dateTime = new DateTime((long)tdistance.X); StringBuilder stringBuilder = new StringBuilder(); // stringBuilder.AppendFormat(this.toolTipFormat, (object) oK6F3TB73XXXGhdieP.wF6SgrNUO(60), (object) oK6F3TB73XXXGhdieP.wF6SgrNUO(84), (object) dateTime.ToString(this.toolTipDateTimeFormat), (object) tdistance.Y); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return tdistance; }
public virtual TDistance Distance(double x, double y) { if (x < 0.0) return null; TDistance tdistance = new TDistance(); int index1 = this.GetIndex(new DateTime((long)x), EIndexOption.Next); int index2 = this.GetIndex(new DateTime((long)x), EIndexOption.Prev); if (index1 != -1) { DateTime dateTime = this.GetDateTime(index1); tdistance.dX = Math.Abs(x - (double)dateTime.Ticks); tdistance.dY = Math.Abs(y - this[dateTime]); tdistance.X = (double)dateTime.Ticks; tdistance.Y = this[dateTime]; } if (index2 != -1) { DateTime dateTime = this.GetDateTime(index2); double num1 = Math.Abs(x - (double)dateTime.Ticks); double num2 = Math.Abs(y - this[dateTime]); if (num1 < tdistance.dX && num2 < tdistance.dY) { tdistance.dX = num1; tdistance.dY = num2; tdistance.X = (double)dateTime.Ticks; tdistance.Y = this[dateTime]; } } if (tdistance.dX == double.MaxValue || tdistance.dY == double.MaxValue) return null; DateTime dateTime1 = new DateTime((long)tdistance.X); StringBuilder stringBuilder = new StringBuilder(); if (this.fToolTipFormat != null && this.fToolTipDateTimeFormat != null) stringBuilder.AppendFormat(this.fToolTipFormat, (object)this.fName, (object)this.fTitle, (object)dateTime1.ToString(this.fToolTipDateTimeFormat), (object)tdistance.Y); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return tdistance; }
public TDistance Distance(double X, double Y) { TDistance tdistance = new TDistance(); int index = this.GetIndex(new DateTime((long)X)); if (index == -1) return (TDistance)null; Quote quote = this[index]; double num = Math.Abs(X - (double)quote.DateTime.Ticks); double val1 = Math.Abs(Y - quote.Ask); double val2 = Math.Abs(Y - quote.Bid); tdistance.dX = num; tdistance.dY = Math.Min(val1, val2); tdistance.X = (double)quote.DateTime.Ticks; tdistance.Y = Y; if (quote == null) return (TDistance)null; DateTime dateTime = new DateTime((long)tdistance.X); StringBuilder stringBuilder = new StringBuilder(); this.toolTipFormat = "tooltipFormat"; // stringBuilder.AppendFormat(this.toolTipFormat, "{0}", (object) dateTime.ToString(this.toolTipDateTimeFormat), (object) oK6F3TB73XXXGhdieP.wF6SgrNUO(278), (object) quote.Bid, (object) oK6F3TB73XXXGhdieP.wF6SgrNUO(288), (object) quote.Ask); tdistance.ToolTipText = stringBuilder.ToString(); return tdistance; }
public TDistance Distance(double X, double Y) { DateTime now = Clock.Now; TDistance tdistance = new TDistance(); double num1 = Math.Abs(((FIXNewOrderSingle) this.order).Price); tdistance.X = X; tdistance.Y = num1; FIXExecutionReport fixExecutionReport = (FIXExecutionReport) null; if (this.order.Reports.Count != 0) fixExecutionReport = (FIXExecutionReport) this.order.Reports[this.order.Reports.Count - 1]; if (fixExecutionReport == null) return (TDistance) null; if (((NewOrderSingle) this.order).OrdType == OrdType.Market && this.order.OrdStatus != OrdStatus.Filled) return (TDistance) null; StringBuilder stringBuilder = (StringBuilder) null; if (((NewOrderSingle) this.order).OrdType == OrdType.Market) { tdistance.X = (double) fixExecutionReport.TransactTime.Ticks; tdistance.Y = fixExecutionReport.Price; tdistance.dX = Math.Abs(X - tdistance.X); tdistance.dY = Math.Abs(Y - tdistance.Y); stringBuilder = new StringBuilder(); if (fixExecutionReport.TransactTime.Second != 0 || fixExecutionReport.TransactTime.Minute != 0 || fixExecutionReport.TransactTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, (object) ((object) this.order.OrdStatus).ToString(), (object) ((object) ((NewOrderSingle) this.order).Side).ToString(), (object) this.order.Instrument.Symbol, (object) ((FIXNewOrderSingle) this.order).OrderQty, (object) "Market ", (object) this.order.AvgPx, (object) fixExecutionReport.TransactTime); else stringBuilder.AppendFormat(this.toolTipFormat, (object) ((object) this.order.OrdStatus).ToString(), (object) ((object) ((NewOrderSingle) this.order).Side).ToString(), (object) this.order.Instrument.Symbol, (object) ((FIXNewOrderSingle) this.order).OrderQty, (object) "Market ", (object) this.order.AvgPx, (object) fixExecutionReport.TransactTime.ToShortDateString()); } if (((NewOrderSingle) this.order).OrdType == OrdType.Stop || ((NewOrderSingle) this.order).OrdType == OrdType.StopLimit) { double num2 = Math.Abs(((FIXNewOrderSingle) this.order).StopPx); tdistance.X = X; tdistance.Y = num2; DateTime transactTime = this.order.Reports[0].TransactTime; tdistance.dX = X < (double) transactTime.Ticks || (this.order.OrdStatus == OrdStatus.Filled || this.order.OrdStatus == OrdStatus.Cancelled || (this.order.OrdStatus == OrdStatus.Rejected || X > (double) now.Ticks)) && X > (double) fixExecutionReport.TransactTime.Ticks ? double.MaxValue : 0.0; tdistance.dY = Math.Abs(Y - tdistance.Y); stringBuilder = new StringBuilder(); if (transactTime.Second != 0 || transactTime.Minute != 0 || transactTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, (object) ((object) this.order.OrdStatus).ToString(), (object) ((object) ((NewOrderSingle) this.order).Side).ToString(), (object) this.order.Instrument.Symbol, (object) ((FIXNewOrderSingle) this.order).OrderQty, (object) "Stop At ", (object) num2, (object) fixExecutionReport.TransactTime); else stringBuilder.AppendFormat(this.toolTipFormat, (object) ((object) this.order.OrdStatus).ToString(), (object) ((object) ((NewOrderSingle) this.order).Side).ToString(), (object) this.order.Instrument.Symbol, (object) ((FIXNewOrderSingle) this.order).OrderQty, (object) "Stop At ", (object) num2, (object) fixExecutionReport.TransactTime.ToShortDateString()); } if (((NewOrderSingle) this.order).OrdType == OrdType.Limit || ((NewOrderSingle) this.order).OrdType == OrdType.StopLimit) { double num2 = Math.Abs(((FIXNewOrderSingle) this.order).Price); tdistance.X = X; tdistance.Y = num2; DateTime transactTime = this.order.Reports[0].TransactTime; tdistance.dX = X < (double) transactTime.Ticks || (this.order.OrdStatus == OrdStatus.Filled || this.order.OrdStatus == OrdStatus.Cancelled || (this.order.OrdStatus == OrdStatus.Rejected || X > (double) now.Ticks)) && X > (double) fixExecutionReport.TransactTime.Ticks ? double.MaxValue : 0.0; if (tdistance.dY > Math.Abs(Y - tdistance.Y)) { tdistance.dY = Math.Abs(Y - tdistance.Y); stringBuilder = new StringBuilder(); if (transactTime.Second != 0 || transactTime.Minute != 0 || transactTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, (object) ((object) this.order.OrdStatus).ToString(), (object) ((object) ((NewOrderSingle) this.order).Side).ToString(), (object) this.order.Instrument.Symbol, (object) ((FIXNewOrderSingle) this.order).OrderQty, (object) "Limit At ", (object) num2, (object) fixExecutionReport.TransactTime); else stringBuilder.AppendFormat(this.toolTipFormat, (object) ((object) this.order.OrdStatus).ToString(), (object) ((object) ((NewOrderSingle) this.order).Side).ToString(), (object) this.order.Instrument.Symbol, (object) ((FIXNewOrderSingle) this.order).OrderQty, (object) "Limit At ", (object) num2, (object) fixExecutionReport.TransactTime.ToShortDateString()); } } if (stringBuilder != null) tdistance.ToolTipText = ((object) stringBuilder).ToString(); return tdistance; }
public TDistance Distance(double x, double y) { TDistance tdistance = new TDistance(); tdistance.X = this.DateTime.Ticks; tdistance.Y = this.Price; tdistance.dX = Math.Abs(x - tdistance.X); tdistance.dY = Math.Abs(y - tdistance.Y); StringBuilder sb = new StringBuilder(); if (this.DateTime.Second != 0 || this.DateTime.Minute != 0 || this.DateTime.Hour != 0) sb.AppendFormat(this.ToolTipFormat, "ffs", (object)((object)this.Side).ToString(), (object)this.Instrument.Symbol, (object)this.Price, (object)this.DateTime, (object)((object)this.Status).ToString()); else sb.AppendFormat(this.ToolTipFormat, "fddsf", this.Side.ToString(), this.Instrument.Symbol, this.Price, (object)this.DateTime.ToShortDateString(), (object)((object)this.Status).ToString()); tdistance.ToolTipText = sb.ToString(); return tdistance; }
public TDistance Distance(double x, double y) { TDistance tdistance = new TDistance(); tdistance.X = this.X; tdistance.Y = this.Y; tdistance.dX = Math.Abs(x - this.X); tdistance.dY = Math.Abs(y - this.Y); StringBuilder sb = new StringBuilder(); sb.AppendFormat(this.ToolTipFormat, this.X, this.Y); tdistance.ToolTipText = sb.ToString(); return tdistance; }
public TDistance Distance(double X, double Y) { TDistance tdistance = new TDistance(); double num = this.J3YAFHAWt0; tdistance.X = X; tdistance.Y = num; tdistance.dX = X < (double)this.CreationTime.Ticks || (this.Status != TriggerStatus.Active || X > (double)Clock.Now.Ticks) && X > (double)this.CompletionTime.Ticks ? double.MaxValue : 0.0; tdistance.dY = Math.Abs(Y - tdistance.Y); StringBuilder stringBuilder = new StringBuilder(); if (this.CreationTime.Second != 0 || this.CreationTime.Minute != 0 || this.CreationTime.Hour != 0) stringBuilder.AppendFormat(this.HKDAVnUw46, (object)((object)this.lh4APrSwVL).ToString(), (object)((object)this.k5kAXvwmyK).ToString(), "", (object)this.J3YAFHAWt0.ToString(this.Signal.Instrument.PriceDisplay), "", (object)this.fISADbUH9Z.Name, (object)num.ToString(this.Signal.Instrument.PriceDisplay), (object)this.CreationTime); else stringBuilder.AppendFormat(this.HKDAVnUw46, (object)((object)this.lh4APrSwVL).ToString(), (object)((object)this.k5kAXvwmyK).ToString(), "", (object)this.J3YAFHAWt0.ToString(this.Signal.Instrument.PriceDisplay), "", (object)this.fISADbUH9Z.Name, (object)num.ToString(this.Signal.Instrument.PriceDisplay), (object)this.CreationTime.ToShortDateString()); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return tdistance; }
public TDistance Distance(double x, double y) { TDistance tdistance = new TDistance(); double num = Math.Abs(this.fStopPrice); tdistance.X = x; tdistance.Y = num; tdistance.dX = x < (double)this.fCreationTime.Ticks || (this.fStatus != StopStatus.Active || x > (double)Clock.Now.Ticks) && x > (double)this.fCompletionTime.Ticks ? double.MaxValue : 0.0; tdistance.dY = Math.Abs(y - tdistance.Y); StringBuilder stringBuilder = new StringBuilder(); if (!this.isFixedPrice) { if (this.fCreationTime.Second != 0 || this.fCreationTime.Minute != 0 || this.fCreationTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, (object)((object)this.fStatus).ToString(), (object)((object)this.fType).ToString(), "", (object)this.fLevel.ToString(this.fPosition.Instrument.PriceDisplay), "", (object)this.fPosition.Instrument.Symbol, (object)num.ToString(this.fPosition.Instrument.PriceDisplay), (object)this.fCreationTime); else stringBuilder.AppendFormat(this.toolTipFormat, (object)((object)this.fStatus).ToString(), (object)((object)this.fType).ToString(), "", (object)this.fLevel.ToString(this.fPosition.Instrument.PriceDisplay), "", (object)this.fPosition.Instrument.Symbol, (object)num.ToString(this.fPosition.Instrument.PriceDisplay), (object)this.fCreationTime.ToShortDateString()); } else if (this.fCreationTime.Second != 0 || this.fCreationTime.Minute != 0 || this.fCreationTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, (object)((object)this.fStatus).ToString(), (object)((object)this.fType).ToString(), "", (object)this.fStopPrice.ToString(this.fPosition.Instrument.PriceDisplay), "", (object)this.fPosition.Instrument.Symbol, (object)num.ToString(this.fPosition.Instrument.PriceDisplay), (object)this.fCreationTime); else stringBuilder.AppendFormat(this.toolTipFormat, (object)((object)this.fStatus).ToString(), (object)((object)this.fType).ToString(), "", (object)this.fStopPrice.ToString(this.fPosition.Instrument.PriceDisplay), "", (object)this.fPosition.Instrument.Symbol, (object)num.ToString(this.fPosition.Instrument.PriceDisplay), (object)this.fCreationTime.ToShortDateString()); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return tdistance; }
public TDistance Distance(double X, double Y) { Transaction transaction1 = null; double num1 = double.MaxValue; TDistance tdistance = new TDistance(); foreach (Transaction transaction2 in this) { double num2 = Math.Abs(transaction2.DateTime.Ticks - X); if (num2 < num1) { num1 = num2; transaction1 = transaction2; } } if (transaction1 != null) { tdistance.X = transaction1.DateTime.Ticks; tdistance.Y = transaction1.Price; tdistance.dX = Math.Abs(X - tdistance.X); tdistance.dY = Math.Abs(Y - tdistance.Y); StringBuilder stringBuilder = new StringBuilder(); if (transaction1.DateTime.Second != 0 || transaction1.DateTime.Minute != 0 || transaction1.DateTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, transaction1.Side.ToString(), transaction1.Instrument.Symbol, (object)transaction1.Qty, (object)transaction1.Price, (object)transaction1.DateTime); else stringBuilder.AppendFormat(this.toolTipFormat, transaction1.Side.ToString(), transaction1.Instrument.Symbol, (object)transaction1.Qty, (object)transaction1.Price, (object)transaction1.DateTime.ToShortDateString()); tdistance.ToolTipText = stringBuilder.ToString(); } else { tdistance.dX = double.MaxValue; tdistance.dY = double.MaxValue; } return tdistance; }
public virtual TDistance Distance(double X, double Y) { TDistance tdistance = new TDistance(); tdistance.X = this.fX; tdistance.Y = this.fY; tdistance.dX = Math.Abs(X - this.fX); tdistance.dY = Math.Abs(Y - this.fY); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat(this.fToolTipFormat, (object) this.fX, (object) this.fY); tdistance.ToolTipText = ((object) stringBuilder).ToString(); return tdistance; }
public override TDistance Distance(double x, double y) { TDistance tdistance = new TDistance(); int index = this.GetIndex(new DateTime((long)x), EIndexOption.Prev); if (index == -1) return null; Bar bar = this[index]; tdistance.dX = x < (double)bar.DateTime.Ticks || x > (double)(bar.DateTime.Ticks + bar.Size * 10000000L) ? double.MaxValue : 0.0; tdistance.dY = y > bar.High || y < bar.Low ? double.MaxValue : 0.0; tdistance.X = (double)bar.DateTime.Ticks; tdistance.Y = bar.Close; if (tdistance.dX == double.MaxValue || tdistance.dY == double.MaxValue) return null; DateTime dateTime = new DateTime((long)tdistance.X); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat(this.fToolTipFormat, (object)this.fName, (object)this.fTitle, (object)bar.DateTime.ToString(this.fToolTipDateTimeFormat), (object)bar.High, (object)bar.Low, (object)bar.Open, (object)bar.Close, (object)bar.Volume); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return tdistance; }
public TDistance Distance(double X, double Y) { TDistance tdistance = new TDistance(); tdistance.X = (double)this.DateTime.Ticks; tdistance.Y = this.Price; tdistance.dX = Math.Abs(X - tdistance.X); tdistance.dY = Math.Abs(Y - tdistance.Y); StringBuilder stringBuilder = new StringBuilder(); if (this.DateTime.Second != 0 || this.DateTime.Minute != 0 || this.DateTime.Hour != 0) stringBuilder.AppendFormat(this.toolTipFormat, (object)((object)this.Side).ToString(), (object)this.Instrument.Symbol, (object)this.Qty, (object)this.Price, (object)this.DateTime); else stringBuilder.AppendFormat(this.toolTipFormat, (object)((object)this.Side).ToString(), (object)this.Instrument.Symbol, (object)this.Qty, (object)this.Price, (object)this.DateTime.ToShortDateString()); tdistance.ToolTipText = ((object)stringBuilder).ToString(); return tdistance; }
public virtual void MouseMove(MouseEventArgs Event) { try { if (!this.fMouseDown) { double num1 = (this.fXMax - this.fXMin) / 100.0; double num2 = (this.fYMax - this.fYMin) / 100.0; double X = this.WorldX(Event.X); double Y = this.WorldY(Event.Y); bool flag = false; string caption = ""; this.fSelectedPrimitive = (IDrawable)null; this.fSelectedPrimitiveDistance = (TDistance)null; this.fOnPrimitive = false; foreach (IDrawable drawable in this.fPrimitives) { TDistance tdistance = drawable.Distance(X, Y); if (tdistance != null && tdistance.dX < num1 && tdistance.dY < num2) { if (drawable.ToolTipEnabled) { if (caption != "") caption = caption + "dd"; caption = caption + tdistance.ToolTipText; flag = true; } this.fOnPrimitive = true; this.fSelectedPrimitive = drawable; this.fSelectedPrimitiveDistance = tdistance; } } if (flag) { this.fChart.ToolTip.SetToolTip((Control)this.fChart, caption); this.fChart.ToolTip.Active = true; } else this.fChart.ToolTip.Active = false; } if (this.fMouseMovePrimitiveEnabled && this.fMouseDown && (this.fMouseDownButton == MouseButtons.Left && this.fOnPrimitive) && this.fSelectedPrimitive is IMovable) { double num1 = this.WorldX(Event.X); double num2 = this.WorldY(Event.Y); ((IMovable)this.fSelectedPrimitive).Move(this.fSelectedPrimitiveDistance.X, this.fSelectedPrimitiveDistance.Y, num1 - this.fSelectedPrimitiveDistance.X, num2 - this.fSelectedPrimitiveDistance.Y); this.fSelectedPrimitiveDistance.X = num1; this.fSelectedPrimitiveDistance.Y = num2; this.fOnPrimitive = true; this.Update(); } if (this.fMouseZoomEnabled && this.fMouseDown && (this.fMouseDownButton == MouseButtons.Left && !this.fOnPrimitive)) { int num1 = Math.Abs(this.fMouseDownX - Event.X); int num2 = Math.Abs(this.fMouseDownY - Event.Y); int num3 = this.fMouseDownX >= Event.X ? Event.X : this.fMouseDownX; int num4 = this.fMouseDownY >= Event.Y ? Event.Y : this.fMouseDownY; this.fOutlineRectangle.X = num3; this.fOutlineRectangle.Y = num4; this.fOutlineRectangle.Width = num1; this.fOutlineRectangle.Height = num2; this.Update(); } if (this.fMouseMoveContentEnabled && this.fMouseDown && this.fMouseDownButton == MouseButtons.Right) { double num1 = (double)(this.fMouseDownX - Event.X) / (double)this.fClientWidth * (this.XMax - this.XMin); double num2 = this.WorldY(this.fMouseDownY) - this.WorldY(Event.Y); double num3 = num1 <= 0.0 ? this.CalculateRealQuantityOfTicks_Left(this.fAxisBottom.Min, this.fAxisBottom.Min + num1) : this.CalculateRealQuantityOfTicks_Right(this.fAxisBottom.Min, this.fAxisBottom.Min + num1); this.fMouseDownX = Event.X; this.fMouseDownY = Event.Y; this.fAxisBottom.SetRange(this.fAxisBottom.Min + num3, this.fAxisBottom.Max + num3); this.fAxisTop.SetRange(this.fAxisTop.Min + num3, this.fAxisTop.Max + num3); this.fAxisLeft.SetRange(this.fAxisLeft.Min + num2, this.fAxisLeft.Max + num2); this.fAxisRight.SetRange(this.fAxisRight.Min + num2, this.fAxisRight.Max + num2); this.fAxisBottom.Zoomed = true; this.fAxisTop.Zoomed = true; this.fAxisLeft.Zoomed = true; this.fAxisRight.Zoomed = true; if (!this.fChart.GroupZoomEnabled) this.Update(); this.EmitZoom(true); } else { this.fOnAxis = false; this.fAxisLeft.MouseMove(Event); this.fAxisBottom.MouseMove(Event); if (this.fAxisLeft.X1 - 10.0 <= (double)Event.X && this.fAxisLeft.X1 >= (double)Event.X && (this.fAxisLeft.Y1 <= (double)Event.Y && this.fAxisLeft.Y2 >= (double)Event.Y)) this.fOnAxis = true; if (this.fAxisBottom.X1 <= (double)Event.X && this.fAxisBottom.X2 >= (double)Event.X && (this.fAxisBottom.Y1 <= (double)Event.Y && this.fAxisBottom.Y1 + 10.0 >= (double)Event.Y)) this.fOnAxis = true; if (this.fOnAxis || this.fOnPrimitive) { if (!(Cursor.Current != Cursors.Hand)) return; Cursor.Current = Cursors.Hand; } else { if (!(Cursor.Current != Cursors.Default)) return; Cursor.Current = Cursors.Default; } } } catch { } }
public TDistance Distance(double X, double Y) { TDistance tdistance1 = new TDistance(); foreach (TMarker tmarker in this.points) { TDistance tdistance2 = tmarker.Distance(X, Y); if (tdistance2.dX < tdistance1.dX && tdistance2.dY < tdistance1.dY) tdistance1 = tdistance2; } if (tdistance1 != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat(this.ToolTipFormat, this.Name, this.Title, (object)tdistance1.X, (object)tdistance1.Y); tdistance1.ToolTipText = stringBuilder.ToString(); } return tdistance1; }