/// <summary> /// The NavigationWaypointParameter defines a waypoint by LinkId and optional Spot value. /// Spot is defined as the fractional distance from the link's reference-node to the /// non-reference node, with a value between 0 and 1. When no Spot value nor /// DisplayPosition is given in request then default value 0.5 is assumed /// <para/> /// The optional display position of the waypoint defines where the location is displayed /// on a map. It denotes the center of the location and is not navigable, i.e.it is not /// located on a link in the routing network in contrast to the navigation positions of a /// location. The display position allows the routing engine to decide whether the /// waypoint is located on the left or on the right-hand side of the route. /// <para/> /// Parameter structure: /// <para/> /// waypoint0= link[!Type[, StopOverDuration]][![DisplayPosition][; UserLabel]]!LinkPosition /// </summary> /// <param name="linkId"> </param> /// <param name="linkDirection"> /// Id of the link position with mandatory direction prefix (+,-,*) and optional relative /// position of the location along the link with a value between 0 and 1. When no spot /// value nor display position is given in the request then default value 0.5 is assumed. /// </param> /// <param name="spot"> </param> /// <param name="waypointType"> /// 180 degree turns are allowed for stopOver but not for passThrough. Waypoints defined /// through a drag-n-drop action should be marked as pass-through. PassThrough waypoints /// will not appear in the list of maneuvers. /// </param> /// <param name="stopOverDuration"> /// Stopover delay in seconds. Impacts time-aware calculations. Ignored for passThrough. /// </param> /// <param name="displayPosition"> /// Latitude WGS-84 degrees between -90 and 90. Longitude WGS-84 degrees between -180 and /// 180. Altitude in meters. /// </param> /// <param name="userLabel"> Custom label identifying this waypoint.</param> public NavigationWaypointParameterWithLinkPositions(uint waypointIndex, LinkId linkId, float?spot = null, WaypointType?waypointType = null, uint?stopOverDuration = null, GeoCoordinate displayPosition = null, string userLabel = null) : base(waypointIndex, waypointType, stopOverDuration, userLabel) { LinkId = linkId; Spot = spot; DisplayPosition = displayPosition; }
public static void HandlePickup(LinkId idType, int id, EventHandler onFinish, EventHandler onFail) { if ((BanchoClient.Permission & Permissions.Supporter) > 0) { OnlineBeatmap.FromId(idType, id.ToString(), delegate(object beatmap, EventArgs f) { OnlineBeatmap ob = beatmap as OnlineBeatmap; if (ob == null) { if (onFail == null) { HandlePickupFallback(idType, id); } else { onFail(null, null); } return; } QueueBeatmapForResponse(ob); ob.OnDownloadFinished += onFinish; }); return; } HandlePickupFallback(idType, id); }
public override int GetHashCode() { return(Gid.GetHashCode() ^ ListId.GetHashCode() ^ LinkId.GetHashCode() ^ Url.GetHashCode()); }
/// <summary> /// /// </summary> /// <param name="id">شناسه</param> /// <param name="linkId">شناسه لینک</param> /// <param name="visitorIpAddress">آیپی مشاهده گر</param> /// <param name="visitDateTime">تاریخ مشاهده</param> public LinkVisit(Guid id, LinkId linkId, string visitorIpAddress, DateTime visitDateTime) { Id = id; LinkId = linkId; VisitorIpAddress = visitorIpAddress; VisitDateTime = visitDateTime; }
public void Save(string fileName) { XmlWriter writer; XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.NewLineChars = "\r\n"; settings.Encoding = Encoding.ASCII; settings.NewLineOnAttributes = false; writer = XmlWriter.Create(fileName, settings); writer.WriteStartDocument(); writer.WriteStartElement("Graph"); writer.WriteAttributeString("Title", Title); writer.WriteAttributeString("VertexId", VertexId.ToString()); writer.WriteAttributeString("LinkId", LinkId.ToString()); writer.WriteAttributeString("PointX", GraphPoint.X.ToString()); writer.WriteAttributeString("PointY", GraphPoint.Y.ToString()); foreach (var vertex in Vertices) { vertex.Save(writer); } writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); writer.Close(); } // Save
public override int GetHashCode() { int hash = 13; hash += (hash * 43) + LinkId.GetHashCode(); return(hash); }
/// <summary> /// ایجاد کننده موجودیت جدید از کلاس لینکویزیت /// </summary> /// <param name="linkId"></param> /// <param name="visitorIpAddress"></param> /// <returns></returns> private LinkVisit LinkVisitGenerator(Guid linkId, string visitorIpAddress) { Guid linkVisitId = Guid.NewGuid(); DateTime visitDateTime = DateTime.Now; LinkVisit linkVisit = new LinkVisit(linkVisitId, LinkId.FromGuid(linkId), visitorIpAddress, visitDateTime); return(linkVisit); }
public override string GetAttributeValue() { return($"link!" + $"{(Type != null ? EnumHelper.GetDescription(Type) : "")}" + $"{(Type == WaypointType.StopOver ? $",{StopOverDuration}" : "")}" + $"{(Type != null ? "!" : "")}" + $"{(DisplayPosition != null ? DisplayPosition.GetAttributeValue() : "")};" + $"{(UserLabel != null ? $"{UserLabel}" : "")};" + $"{LinkId.GetAttributeValue()},{(Spot != float.NaN ? $"{Spot.Value.ToString(HereAPISession.Culture)}" : "0.5")}"); }
/// <summary> /// Возвращает урл для элемента /// <param group="linkId">идентификатор ссылки</param> /// <param group="item">элемент, для которого нужно получить ссылку</param> /// </summary> public LinkInfo GetLink(string patternUrl, LinkId linkId, SourceWithTranslation item) { string text; if (!_links.TryGetValue(linkId, out text)) { return(null); } string url = item != null?_linkUrlGetter(patternUrl, item) : null; return(new LinkInfo(text, url ?? CommonConstants.EMPTY_LINK)); }
private static void HandlePickupFallback(LinkId idType, int id) { switch (idType) { case LinkId.Beatmap: GameBase.ProcessStart(string.Format(Urls.BEATMAP_LISTING, id)); break; case LinkId.Set: GameBase.ProcessStart(string.Format(Urls.BEATMAP_SET_LISTING, id)); break; case LinkId.Post: GameBase.ProcessStart(string.Format(Urls.FORUM_POST, id)); break; case LinkId.Topic: GameBase.ProcessStart(string.Format(Urls.FORUM_TOPIC, id)); break; } }
public override int GetHashCode() { int hash = 1; if (Id != 0) { hash ^= Id.GetHashCode(); } hash ^= weapons_.GetHashCode(); if (bornPosition_ != null) { hash ^= BornPosition.GetHashCode(); } hash ^= testTypes_.GetHashCode(); if (LinkId != 0) { hash ^= LinkId.GetHashCode(); } if (Model.Length != 0) { hash ^= Model.GetHashCode(); } if (Icon.Length != 0) { hash ^= Icon.GetHashCode(); } hash ^= machineTypes_.GetHashCode(); if (MapType.Length != 0) { hash ^= MapType.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public static void UpdateControlPointDisplay(SignalControllerPretimed sigController, NetworkData Network, int timeIndex) { int ActiveTimingPlanId = 0; int LinkIndex; foreach (TimingRingData timingRing in sigController.TimingPlans[ActiveTimingPlanId].TimingRings) { foreach (PhaseTimingData phase in timingRing.Phases) { foreach (VehicleControlPointData PhaseControlPoint in phase.AssociatedControlPoints) { foreach (uint LinkId in sigController.AssociatedLinkIds) { try { LinkIndex = Network.Links.FindIndex(Link => Link.Id.Equals(LinkId)); foreach (LaneData Lane in Network.Links[LinkIndex].Lanes) { foreach (VehicleControlPointData LanecontrolPoint in Lane.ControlPoints) { if (LanecontrolPoint.LinkId == PhaseControlPoint.LinkId && LanecontrolPoint.LaneId == Lane.Id && LanecontrolPoint.ControlPhaseId == PhaseControlPoint.ControlPhaseId) { LanecontrolPoint.DisplayIndication = phase.Display[timeIndex]; } } } } catch (System.Exception ex) { throw new System.Exception("UpdateControlPointDisplay Method; Signal Controller Id: " + sigController.Id + " Associated Link Id: " + LinkId.ToString() + " could not be found in network;", ex); } } } } } }
public static void HandlePickup(LinkId idType, int id, EventHandler onFinish) { HandlePickup(idType, id, onFinish, null); }
/// <inheritdoc/> protected override IEnumerable <string> GetArgumentsImpl(object application) { yield return(IpcPortName); yield return(LinkId.ToString()); }
public void ParameterValueFormat(int id, LinkDirection dir, string expected) { LinkId l = new LinkId(id, dir); Assert.AreEqual(expected, l.GetAttributeValue()); }
// Token: 0x06002A8C RID: 10892 // RVA: 0x00112D6C File Offset: 0x00110F6C internal Class690(string string_5, LinkId linkId_0, string string_6) { string[] array = string_5.Split(new char[] { '|' }); int num = 0; string[] arg_27_0 = array; int arg_27_1 = 0; num = 1; this.string_3 = arg_27_0[arg_27_1]; string[] arg_32_0 = array; int arg_32_1 = 1; num = 2; this.string_0 = arg_32_0[arg_32_1]; string[] arg_3D_0 = array; int arg_3D_1 = 2; num = 3; this.string_2 = arg_3D_0[arg_3D_1]; string[] arg_48_0 = array; int arg_48_1 = 3; num = 4; this.string_1 = arg_48_0[arg_48_1]; string[] arg_52_0 = array; int arg_52_1 = 4; num = 5; string text = arg_52_0[arg_52_1]; string a; if ((a = text) != null) { if (a == "1") { this.submissionStatus_0 = SubmissionStatus.Ranked; goto IL_8F; } if (a == "2") { this.submissionStatus_0 = SubmissionStatus.Approved; goto IL_8F; } } this.submissionStatus_0 = SubmissionStatus.Pending; IL_8F: float.TryParse(array[num++], NumberStyles.Any, Class115.numberFormatInfo_0, out this.float_0); try { this.dateTime_0 = Convert.ToDateTime(array[num++]); } catch { this.dateTime_0 = DateTime.Now; } this.int_0 = int.Parse(array[num++]); this.int_1 = int.Parse(array[num++]); this.bool_2 = (array[num++] == "1"); this.bool_3 = (array[num++] == "1"); this.int_4 = int.Parse(array[num++]); if (this.bool_2 && array[num].Length > 0) { this.int_3 = int.Parse(array[num++]); } num = 13; if (13 < array.Length) { this.string_4 = array[num++].Split(new char[] { ',' }); } if (linkId_0 == LinkId.Post) { this.int_2 = int.Parse(string_6); } this.bool_1 = (Class466.smethod_33(this.int_0) != null); if (!this.bool_0) { Class854 class = Class112.list_0.Find((Class854 class854_1) => class854_1.method_0() == this.string_3);