internal override void Save(IResourceLibrary ehres) { XmlNode quickLinksNode = this.QuickLinksNode; MediaCenterUtil.StripChildComments(quickLinksNode); foreach (XmlQuickLink xmlQuickLink in (Collection <IQuickLink>) this.QuickLinks) { XmlNode parentNode = xmlQuickLink.XmlElement.ParentNode; if (parentNode != null) { try { parentNode.RemoveChild((XmlNode)xmlQuickLink.XmlElement); } catch (Exception) { } } bool flag = true; Windows7PartnerQuickLink partnerQuickLink = xmlQuickLink as Windows7PartnerQuickLink; if (partnerQuickLink != null) { flag = partnerQuickLink.OemQuickLink != null; } if (flag) { if (xmlQuickLink.IsEnabled) { quickLinksNode.AppendChild((XmlNode)xmlQuickLink.XmlElement); } else { XmlComment comment = this.MenuStripDocument.CreateComment(xmlQuickLink.XmlElement.OuterXml); quickLinksNode.AppendChild((XmlNode)comment); } } } if (this.Title != this.m_originalTitle) { this.StartMenuCategoryNode.Attributes["Description"].Value = this.Title; } base.Save(ehres); }
internal override void Save(IResourceLibrary ehres) { if (this.OemQuickLink != null) { OemQuickLink oemQuickLink = this.OemQuickLink; this.launchElement.SetAttribute("AppId", oemQuickLink.ApplicationID); this.launchElement.SetAttribute("EntryPointId", oemQuickLink.EntryPointID); this.LinkElement.SetAttribute("Description", this.OemQuickLink.Title); this.LinkElement.SetAttribute("EntryPointId", oemQuickLink.EntryPointID); XmlElement xmlElement = (XmlElement)Enumerable.First <XmlElement>(Enumerable.OfType <XmlElement>((IEnumerable)this.LinkElement), (Func <XmlElement, bool>)(o => o.Name == "Image")).FirstChild.FirstChild; Enumerable.First <XmlElement>(Enumerable.OfType <XmlElement>((IEnumerable)xmlElement.ChildNodes), (Func <XmlElement, bool>)(o => o.GetAttribute("Name") == "Focus")).SetAttribute("Source", Windows7PartnerQuickLink.GetFileUrl(oemQuickLink.EntryPoint.ImageUrl)); Enumerable.First <XmlElement>(Enumerable.OfType <XmlElement>((IEnumerable)xmlElement.ChildNodes), (Func <XmlElement, bool>)(o => o.GetAttribute("Name") == "Default")).SetAttribute("Source", Windows7PartnerQuickLink.GetFileUrl(oemQuickLink.EntryPoint.InactiveImageUrl ?? oemQuickLink.EntryPoint.ImageUrl)); } base.Save(ehres); }