Esempio n. 1
0
        protected override IPartnerQuickLink GetFreePartnerQuickLink(OemQuickLink oemLink)
        {
            IPartnerQuickLink partnerQuickLink = base.GetFreePartnerQuickLink(oemLink);

            if (partnerQuickLink == null)
            {
                XmlElement element = this.MenuStripDocument.CreateElement("home", "DefaultPartnerQuicklink", this.MenuStripDocument.DocumentElement.GetAttribute("xmlns:home"));
                element.SetAttribute("ExtensibilityCategory", string.Format("{0}\\Category {{{1}}}", (object)this.Manager.CustomInternalCategory, (object)Guid.NewGuid()));
                int num = 100;
                element.SetAttribute("Priority", num.ToString());
                partnerQuickLink = (IPartnerQuickLink) new FijiPartnerQuickLink(this.Manager, element, true);
                partnerQuickLink.BeginInit();
                partnerQuickLink.Priority = num;
                XmlMenuStrip.XmlQuickLinkCollection quickLinkCollection = (XmlMenuStrip.XmlQuickLinkCollection) this.QuickLinks;
                quickLinkCollection.BeginInit();
                quickLinkCollection.Add((IQuickLink)partnerQuickLink);
                quickLinkCollection.EndInit();
                partnerQuickLink.EndInit();
            }
            return(partnerQuickLink);
        }
Esempio n. 2
0
        protected override IPartnerQuickLink GetFreePartnerQuickLink(OemQuickLink oemLink)
        {
            IPartnerQuickLink partnerQuickLink = base.GetFreePartnerQuickLink(oemLink);

            if (partnerQuickLink == null)
            {
                string     attribute1 = this.MenuStripDocument.DocumentElement.GetAttribute("xmlns");
                string     attribute2 = this.MenuStripDocument.DocumentElement.GetAttribute("xmlns:home");
                XmlElement element1   = this.MenuStripDocument.CreateElement("home", "CommandQuickLink", attribute2);
                element1.SetAttribute("SqmTrackingId", "-1");
                element1.SetAttribute("ViewTemplate", "@res://Microsoft.MediaCenter.Shell!StartMenuQuickLink.mcml#PartnerQuickLinkContent");
                XmlElement element2 = this.MenuStripDocument.CreateElement("Image", attribute1);
                element1.AppendChild((XmlNode)element2);
                XmlElement element3 = this.MenuStripDocument.CreateElement("shll", "ImageSet", this.MenuStripDocument.DocumentElement.GetAttribute("xmlns:shll"));
                element3.SetAttribute("DefaultImageName", "Default");
                element2.AppendChild((XmlNode)element3);
                XmlElement element4 = this.MenuStripDocument.CreateElement("Values", attribute1);
                element3.AppendChild((XmlNode)element4);
                XmlElement element5 = this.MenuStripDocument.CreateElement("Image", attribute1);
                element5.SetAttribute("Name", "Default");
                element4.AppendChild((XmlNode)element5);
                XmlElement element6 = this.MenuStripDocument.CreateElement("Image", attribute1);
                element6.SetAttribute("Name", "Focus");
                element4.AppendChild((XmlNode)element6);
                XmlElement element7 = this.MenuStripDocument.CreateElement("Command", attribute1);
                element1.AppendChild((XmlNode)element7);
                XmlElement element8 = this.MenuStripDocument.CreateElement("home", "LaunchExtensibilityEntryPointCommand", attribute2);
                element7.AppendChild((XmlNode)element8);
                partnerQuickLink = (IPartnerQuickLink) new Windows7PartnerQuickLink(this.Manager, element1);
                partnerQuickLink.BeginInit();
                partnerQuickLink.Priority = int.MaxValue;
                XmlMenuStrip.XmlQuickLinkCollection quickLinkCollection = (XmlMenuStrip.XmlQuickLinkCollection) this.QuickLinks;
                quickLinkCollection.BeginInit();
                quickLinkCollection.Add((IQuickLink)partnerQuickLink);
                quickLinkCollection.EndInit();
                partnerQuickLink.EndInit();
            }
            return(partnerQuickLink);
        }