/// <summary> /// Applies the Skin Groups to individual controls /// </summary> public void ApplySkin() { SkinStyleClass style; //Background style = UIManagerClass.UIManager.Skin.GetSkinStyle("MainScreenFeatsPanelBackground"); this.BackColor = style.Color1; //Header style = UIManagerClass.UIManager.Skin.GetSkinStyle("MainScreenFeatsPanelHeader"); labelFeatsPanelHeader.BackColor = style.Color2; labelFeatsPanelHeader.ForeColor = style.Color1; labelFeatsPanelHeader.Font = style.Font; //Header Button style = UIManagerClass.UIManager.Skin.GetSkinStyle("MainScreenFeatsPanelHeaderButton"); buttonEditFeats.BackColor = style.Color2; buttonEditFeats.ForeColor = style.Color1; buttonEditFeats.Font = style.Font; //Feats Tree View control style = UIManagerClass.UIManager.Skin.GetSkinStyle("MainScreenFeatsPanelFeatsList"); treeViewFeats.BackColor = style.Color2; treeViewFeats.ForeColor = style.Color1; treeViewFeats.Font = style.Font; //Button choices ButtonNotSelectedStyle = UIManagerClass.UIManager.Skin.GetSkinStyle("MainScreenFeatsPanelButton"); ButtonSelectedStyle = UIManagerClass.UIManager.Skin.GetSkinStyle("MainScreenFeatsPanelButtonSelected"); ChangeSelectedButtons(ButtonSelected); }
public void ApplySkin() { SkinStyleClass style; string controlName; Button controlButton; UIManagerClass uiManager = UIManagerClass.UIManager; style = uiManager.Skin.GetSkinStyle("MainScreenBackgroundColor"); this.BackColor = style.Color1; style = uiManager.Skin.GetSkinStyle("MainScreenNormalLabelFont"); AlignmentLabel.Font = style.Font; AlignmentLabel.ForeColor = style.Color1; AlignmentLabel.BackColor = style.Color2; RaceLabel.Font = style.Font; RaceLabel.ForeColor = style.Color1; RaceLabel.BackColor = style.Color2; //just testing, making sure skin sytles are working.... style = uiManager.Skin.GetSkinStyle("MainScreenGrayFont"); NameLabel.Font = style.Font; NameLabel.ForeColor = style.Color1; NameLabel.BackColor = style.Color2; ClassLabel.Font = style.Font; ClassLabel.ForeColor = style.Color1; ClassLabel.BackColor = style.Color2; //apply the panel skins mainScreenAbilitiesPanel1.ApplySkin(); mainScreenAdditionStatsPanel1.ApplySkin(); mainScreenFeatsPanel1.ApplySkin(); //apply the level button styles ButtonSelectedStyle = uiManager.Skin.GetSkinStyle("MainScreenLevelButtonSelected"); ButtonNotSelectedStyle = uiManager.Skin.GetSkinStyle("MainScreenLevelButton"); for (int i = 1; i < 31; i++) { controlName = "LevelButton" + i; controlButton = (Button)this.Controls[controlName]; if (i == SelectedLevel) { style = ButtonSelectedStyle; } else { style = ButtonNotSelectedStyle; } controlButton.BackColor = style.Color2; controlButton.ForeColor = style.Color1; controlButton.Font = style.Font; } }
public void CreateFactorySettings() { SkinStyleClass style; //Factory Colors style = new SkinStyleClass(Color.Black); DistributeSkinStyle(GetStyleString(FactoryName.ScreenBackgroundColor), style); style = new SkinStyleClass(Color.FromArgb(20, 20, 20)); //a dark gray DistributeSkinStyle(GetStyleString(FactoryName.PanelBackgroundColor), style); style = new SkinStyleClass(Color.FromArgb(88, 182, 231)); DistributeSkinStyle(GetStyleString(FactoryName.PanelHeaderColor), style); //Factory fonts style = new SkinStyleClass("Microsoft San Serif", 8.25f, Color.White); DistributeSkinStyle(GetStyleString(FactoryName.StandardFont), style); style = new SkinStyleClass("Microsoft San Serif", 10.0f, FontStyle.Bold, Color.White); DistributeSkinStyle(GetStyleString(FactoryName.StandardBoldFont), style); style = new SkinStyleClass("Microsoft San Serif", 6.25f, Color.White); DistributeSkinStyle(GetStyleString(FactoryName.SmallFont), style); style = new SkinStyleClass("Microsoft San Serif", 5.50f, Color.White); DistributeSkinStyle(GetStyleString(FactoryName.TinyFont), style); style = new SkinStyleClass("Microsoft San Serif", 8.25f, Color.DimGray); DistributeSkinStyle(GetStyleString(FactoryName.ReadOnlyFont), style); style = new SkinStyleClass("Times New Roman", 10.0f, FontStyle.Bold, Color.Gold); DistributeSkinStyle(GetStyleString(FactoryName.GoldBoldFont), style); style = new SkinStyleClass("Trebuchet MS", 12.0f, FontStyle.Bold, Color.White, Color.FromArgb(88, 182, 231)); DistributeSkinStyle(GetStyleString(FactoryName.PanelHeaderFont), style); //Factory Buttons style = new SkinStyleClass("Microsoft San Serif", 8.25f, FontStyle.Bold, Color.White, Color.FromName("DeepSkyBlue")); DistributeSkinStyle(GetStyleString(FactoryName.PanelHeaderButton), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Regular, Color.Black, Color.Silver); DistributeSkinStyle(GetStyleString(FactoryName.StandardButton), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Regular, Color.Black, Color.Green); DistributeSkinStyle(GetStyleString(FactoryName.StandardButtonSelected), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Bold, Color.Black, Color.Silver); DistributeSkinStyle(GetStyleString(FactoryName.DIButton1), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Bold, Color.Blue, Color.Black); DistributeSkinStyle(GetStyleString(FactoryName.DIButton2), style); //Factory Controls style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Regular, Color.White, Color.FromArgb(99, 99, 99)); DistributeSkinStyle(GetStyleString(FactoryName.DIControls), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Regular, Color.White, Color.Transparent); DistributeSkinStyle(GetStyleString(FactoryName.StandardLabel), style); style = new SkinStyleClass("Trebucket MS", 12.0f, FontStyle.Bold, Color.White, Color.FromArgb(88, 182, 231)); DistributeSkinStyle(GetStyleString(FactoryName.PanelHeader), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Regular, Color.White, Color.FromArgb(99, 99, 99)); DistributeSkinStyle(GetStyleString(FactoryName.StandardControl), style); style = new SkinStyleClass("Microsoft Sans Serif", 8.25f, FontStyle.Regular, Color.White, Color.FromArgb(20, 20, 20)); DistributeSkinStyle(GetStyleString(FactoryName.ListControl), style); }
private void DistributeSkinStyle(string factoryName, SkinStyleClass style) { string key; for (int i = 0; i < FactoryToOverrideConversionList.Count; i++) { if (FactoryToOverrideConversionList[i][0] == factoryName) { for (int j = 1; j < FactoryToOverrideConversionList[i].Count; j++) { key = FactoryToOverrideConversionList[i][j]; if (SkinDictionary.ContainsKey(key)) { SkinDictionary[key] = style; } else { SkinDictionary.Add(key, style); } } } } }