コード例 #1
0
ファイル: SkinBootstrapper.cs プロジェクト: yegorpetrov/whip
        public SkinBootstrapper()
        {
            try
            {
                var reader = new WinampXmlReader(Path.Combine(root, "skin.xml"));
                var skin   = XDocument.Load(reader);

                var store = new ElementStore(skin.Elements().First(), root)
                {
                    Next = environment
                };
                store.Preload();

                var containers =
                    skin
                    .Elements()
                    .First()
                    .Elements("container");

                var main =
                    containers
                    .Where(c => c.Attribute("id").Value == "main")
                    .First();

                Container.FromXml(main, store).Show();

                store.System.Run();
            }
            catch (DirectoryNotFoundException)
            {
            }
        }
コード例 #2
0
ファイル: SkinBootstrapper.cs プロジェクト: yegorpetrov/whip
        static SkinBootstrapper()
        {
            var env = new[]
            {
                @"about\about.xml",
                @"checkbox\checkbox.xml",
                @"combobox\combobox.xml",
                @"dropdownlist\dropdownlist.xml",
                @"guiobjects.xml",
                @"historyeditbox\historyeditbox.xml",
                @"menubutton\menubutton.xml",
                @"msgbox\msgbox.xml",
                @"pathpicker\pathpicker.xml",
                @"popupmenu\popupmenu.xml",
                @"statusbar\statusbar.xml",
                @"tabsheet\tabsheet.xml",
                @"titlebox\titlebox.xml",
                @"tooltips\tooltips.xml",
                @"wasabi\wasabi.xml",
                @"winamp\cover\cover.xml",
                @"winamp\thinger\thinger.xml"
            };

            foreach (var e in env)
            {
                var path = Path.Combine(root2, e);
                var wxr  = new WinampXmlReader(path);
                var es   = new ElementStore(
                    XDocument.Load(wxr).Elements().First(),
                    Path.GetDirectoryName(path))
                {
                    Next = environment
                };
                environment = es;
            }
        }