Esempio n. 1
0
        public WindowBorderSkin(string skinName, string colorSchemeName)
        {
            if (!Directory.Exists(skinName))
            {
                throw new Exception("Skin selected doesn't exsits.\nMake sure that you didn't remove the skin folder.");
            }

            _skinLoader = new SkinIniLoader(skinName);

            ColorScheme = SkinLoader.GetColorScheme(colorSchemeName);

            MaximizedTopFrame = SkinLoader.GetSkinElement(SkinIDs.MaximizedTop);
            TopFrame          = SkinLoader.GetSkinElement(SkinIDs.Top);
            LeftFrame         = SkinLoader.GetSkinElement(SkinIDs.Left);
            RightFrame        = SkinLoader.GetSkinElement(SkinIDs.Right);
            BottomFrame       = SkinLoader.GetSkinElement(SkinIDs.Bottom);
            ReflectionImage   = SkinLoader.GetSkinElement(SkinIDs.Reflection);

            MinimizeButton  = SkinLoader.GetSkinElement(SkinIDs.MinButton);
            MaximizeButton  = SkinLoader.GetSkinElement(SkinIDs.MaxButton);
            RestoreButton   = SkinLoader.GetSkinElement(SkinIDs.ResButton);
            HelpButton      = SkinLoader.GetSkinElement(SkinIDs.HelpButton);
            TitleBackground = SkinLoader.GetSkinElement(SkinIDs.CaptionBackground);
            CloseButton     = SkinLoader.GetSkinElement(SkinIDs.CloseButton);
            Close2Button    = SkinLoader.Exists(SkinIDs.Close2Button) ? SkinLoader.GetSkinElement(SkinIDs.Close2Button) : CloseButton;

            Caption = SkinLoader.GetSkinElement(SkinIDs.Caption);
            Icon    = SkinLoader.GetSkinElement(SkinIDs.Icon);

            SizingPadding      = SkinLoader.GetRect(SkinIDs.General, SkinKeys.Sizing);
            InActiveReflection = (byte)SkinLoader.GetCustomIntegerProperty(SkinIDs.General, SkinKeys.ReflectionInActive, 255);
        }
Esempio n. 2
0
        public ExplorerSkin(string SkinPath, string ColorScheme) : base(SkinPath, ColorScheme)
        {
            NavigateBackButton     = SkinLoader.GetSkinElement(ExplorerSkinIDs.NavigateBackButton);
            NavigateForewardButton = SkinLoader.GetSkinElement(ExplorerSkinIDs.NavigateForewardButton);
            SearchButton           = SkinLoader.GetSkinElement(ExplorerSkinIDs.SearchButton);
            RefreshButton          = SkinLoader.GetSkinElement(ExplorerSkinIDs.RefreshButton);
            DownArrowButton        = SkinLoader.GetSkinElement(ExplorerSkinIDs.DownArrowButton);
            BreadCrumbButton       = SkinLoader.GetSkinElement(ExplorerSkinIDs.BreadCrumbButton);
            HistoryButton          = SkinLoader.GetSkinElement(ExplorerSkinIDs.HistoryButton);
            AddressBarButton       = SkinLoader.GetSkinElement(ExplorerSkinIDs.AddressBarBackground);

            PopupBox     = SkinLoader.GetSkinElement(ExplorerSkinIDs.Box);
            PopupboxItem = SkinLoader.GetSkinElement(ExplorerSkinIDs.BoxButton);
            RecentIcons  = SkinLoader.GetSkinElement(ExplorerSkinIDs.RecentIcons);

            Box = new LayeredPopupMenu();
            Box.BackgroundImage    = PopupBox.Frames[0];
            Box.ContentMargin      = PopupBox.ContentPadding;
            Box.StretchMargin      = PopupBox.StretchPadding;
            Box.ScrollbarAlighnemt = PopupBox.ElementAlign;

            Box.ItemBackgroundImage              = PopupboxItem.Frames[0];
            Box.ItemHoveredBackgroundImage       = PopupboxItem.Frames[1];
            Box.ItemBackgroundImageStretchMargin = PopupboxItem.StretchPadding;
            Box.ItemContent      = PopupboxItem.ContentPadding;
            Box.ItemIconLocation = new Point(PopupboxItem.NormalEdges.Left, PopupboxItem.NormalEdges.Top);

            Box.Font           = PopupboxItem.Font;
            Box.ForeColorBrush = PopupboxItem.NormalTextBrush;

            BoxButton = PopupboxItem;

            DefaultSearchText = SkinLoader.GetCustomStringProperty(SkinIDs.General, SkinKeys.DefaultSearchText, "Search");
            RightArrowWidth   = SkinLoader.GetCustomIntegerProperty(SkinIDs.General, SkinKeys.RightArrowWidth, 0);
        }