public virtual object Clone() { Zone z = new Zone(); z.ZoneColor = ZoneColor; z.EndCoordinate = EndCoordinate.Clone() as AxisCoordinate; z.StartCoordinate = StartCoordinate.Clone() as AxisCoordinate; z.OppositeAxisTitle = OppositeAxisTitle; return(z); }
protected override ICurve[] Create(CancellationToken cancellationToken) { var line = m_Modeler.CreateLine(StartCoordinate.ToArray(), (StartCoordinate - EndCoordinate).ToArray()) as ICurve; line = line.CreateTrimmedCurve2(StartCoordinate.X, StartCoordinate.Y, StartCoordinate.Z, EndCoordinate.X, EndCoordinate.Y, EndCoordinate.Z); if (line == null) { throw new NullReferenceException("Failed to create line"); } return(new ICurve[] { line }); }
protected override void OnInit(EventArgs e) { base.OnInit(e); if (_maximumAvailableControl == 0) { return; } coord = StartCoordinate.ToString().Split(spliter); populateDropDownLists(); initDropDownLists(); }
public override string ToString() { var builder = new StringBuilder(); builder.AppendFormat("\nid: {0}\n", Id); builder.AppendFormat("name: {0}\n", Name ?? string.Empty); builder.AppendFormat("climbCategory: {0}\n", ClimbCategory); builder.AppendFormat("averageGrade: {0}\n", AverageGrade); builder.AppendFormat("StartCoordinate: {0}\n", StartCoordinate != null ? StartCoordinate.ToString() : string.Empty); builder.AppendFormat("EndCoordinate: {0}\n", EndCoordinate != null ? EndCoordinate.ToString() : string.Empty); builder.AppendFormat("ElevationDifference: {0}\n", ElevationDifference); return(builder.ToString()); }
public override string ToString() { var builder = new StringBuilder(); builder.AppendFormat("\nid: {0}\n", Id); builder.AppendFormat("name: {0}\n", Name ?? string.Empty); builder.AppendFormat("climbCategory: {0}\n", ClimbCategory); builder.AppendFormat("TimeRidden: {0}\n", TimeRidden); builder.AppendFormat("RidersRidden: {0}\n", RidersRidden); builder.AppendFormat("StartCoordinate: {0}\n", StartCoordinate != null ? StartCoordinate.ToString() : string.Empty); builder.AppendFormat("EndCoordinate: {0}\n", EndCoordinate != null ? EndCoordinate.ToString() : string.Empty); builder.AppendFormat("ElevationDifference: {0}\n", ElevationDifference); builder.AppendFormat("KingOfMountain: {0}\n", KingOfMountain != null ? KingOfMountain.ToString() : string.Empty); return(builder.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); if (StartCoordinate != null) { sb.Append(StartCoordinate.ToString()); sb.Append(", "); } if (EndCoordinate != null) { sb.Append(EndCoordinate.ToString()); sb.Append(", "); } sb.Append(string.Format("ZoneColor={0}, OppositeAxisTitle={1}", ZoneColorName, OppositeAxisTitle)); return(sb.ToString()); }
public override string ToString() { var builder = new StringBuilder(); builder.AppendFormat("\nid: {0}\n", Id); builder.AppendFormat("name: {0}\n", Name ?? string.Empty); builder.AppendFormat("startDateLocal: {0}\n", StartDateLocal ?? string.Empty); builder.AppendFormat("elapsedTime: {0}\n", ElapsedTime); builder.AppendFormat("movingTime: {0}\n", MovingTime); builder.AppendFormat("distance: {0}\n", Distance); builder.AppendFormat("averageSpeed: {0}\n", AverageSpeed); builder.AppendFormat("elevationGain: {0}\n", ElevationGain); builder.AppendFormat("location: {0}\n", Location ?? string.Empty); builder.AppendFormat("StartCoordinate: {0}\n", StartCoordinate != null ? StartCoordinate.ToString() : string.Empty); builder.AppendFormat("EndCoordinate: {0}\n", EndCoordinate != null ? EndCoordinate.ToString() : string.Empty); return(builder.ToString()); }
/// <summary> /// escolhe o contrlo a carregar /// </summary> private TravelCoordControlBase chooseControl() { string id = "1"; string coordClicked = ""; TravelCoordControlBase ctrl; if (Page.IsPostBack) // Houve um post na pgina { string postedStr = Page.Request.Form["controlToShow"]; if (postedStr != null && postedStr != string.Empty) //posted por click no controlo { coordClicked = Page.Request.Form["numberClicked"]; id = postedStr; } else //post feito por outro controlo { coordClicked = travelPanel.CurrentCoordinate; id = travelPanel.CurrentControl; } ctrl = createControl(id, coordClicked); } else // Situao inicial { id = _maximumAvailableControl.ToString(); coordClicked = StartCoordinate.ToString(); ctrl = createControl(id, coordClicked); } if (!travelPanel.verifyCoordinate(coordClicked)) { travelPanel.Visible = false; } else { travelPanel.Visible = true; } return(ctrl); }
public override int GetHashCode() { int hashCode = 0; if (StartCoordinate != null) { hashCode ^= StartCoordinate.GetHashCode(); } if (EndCoordinate != null) { hashCode ^= EndCoordinate.GetHashCode(); } if (!string.IsNullOrEmpty(ZoneColorName)) { hashCode ^= ZoneColorName.GetHashCode(); } if (!string.IsNullOrEmpty(OppositeAxisTitle)) { hashCode ^= OppositeAxisTitle.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { return(StartCoordinate.GetHashCode()); // start position is sufficient for uniqueness; }