/// <summary> /// Gets the tag collection. /// </summary> /// <param name="xmlData"> /// The XML data. /// </param> /// <returns> /// </returns> private HLinkTagModelCollection GetTagCollection(XElement xmlData) { HLinkTagModelCollection t = new HLinkTagModelCollection(); var theERElement = from _ORElementEl in xmlData.Elements(ns + "tagref") select _ORElementEl; if (theERElement.Any()) { // load tag references foreach (XElement theLoadORElement in theERElement) { HLinkTagModel t2 = new HLinkTagModel { HLinkKey = GetAttribute(theLoadORElement.Attribute("hlink")), }; t.Add(t2); } } // Return sorted by the default text t.Sort(T => T.DeRef.GetDefaultText); return(t); }
/// <summary> /// Gets the tag collection. /// </summary> /// <param name="xmlData"> /// The XML data. /// </param> /// <returns> /// </returns> private HLinkTagModelCollection GetTagCollection(XElement xmlData) { HLinkTagModelCollection t = new HLinkTagModelCollection { Title = "Tag Collection" }; var theERElement = from _ORElementEl in xmlData.Elements(ns + "tagref") select _ORElementEl; if (theERElement.Any()) { // load tag references foreach (XElement theLoadORElement in theERElement) { HLinkTagModel t2 = new HLinkTagModel { HLinkKey = GetHLinkKey(theLoadORElement), }; t.Add(t2); } } // Return sorted by the default text t.Sort(T => T.DeRef.ToString()); return(t); }
/// <summary> /// Gets or sets the tag object. /// </summary> /// <value> /// The tag object. /// </value> /// <summary> /// Handles navigation in wards and sets up the event model parameter. /// </summary> /// <param name="e"> /// The <see cref="NavigatedToEventArgs"/> instance containing the event data. /// </param> /// <param name="viewModelState"> /// The parameter is not used. /// </param> public override void HandleViewDataLoadEvent() { HLinkTagModel HLinkObject = CommonRoutines.GetHLinkParameter <HLinkTagModel>(BaseParamsHLink); TagObject = HLinkObject.DeRef; if (!(TagObject is null)) { BaseModelBase = TagObject; BaseTitleIcon = Constants.IconTag; BaseDetail.Add(new CardListLineCollection("Tag Detail") { new CardListLine("Name:", TagObject.GName), new CardListLine("Priority:", TagObject.GPriority.ToString(System.Globalization.CultureInfo.CurrentCulture)), new CardListLine("Private:", TagObject.Priv.ToString()), }); BaseDetail.Add(DV.TagDV.GetModelInfoFormatted(TagObject)); } return; }