internal Color GetGridBorderColor() { Skin skin = VGridSkins.GetSkin(UserLookAndFeel.Default.ActiveLookAndFeel); SkinElement elem = skin[VGridSkins.SkinBorder]; return(elem.Color.ForeColor); }
protected void DrawBody(ControlGraphicsInfoArgs info) { Rectangle bound = (info.ViewInfo as ToggleSwitchViewInfo).BodyRectangle; Skin currentSkin = EditorsSkins.GetSkin((info.ViewInfo as ToggleSwitchViewInfo).LookAndFeel); Rectangle bodyRect = (info.ViewInfo as ToggleSwitchViewInfo).BodyRectangle; bodyRect.Inflate(-3, -3); currentSkin = CommonSkins.GetSkin((info.ViewInfo as ToggleSwitchViewInfo).LookAndFeel); SkinElement element = currentSkin[CommonSkins.SkinTextBorder]; Color borderColor = element.Border.Top; info.Cache.FillRectangle(info.Cache.GetSolidBrush(DevExpress.LookAndFeel.LookAndFeelHelper.GetSystemColorEx((info.ViewInfo as ToggleSwitchViewInfo).LookAndFeel, SystemColors.Control)), info.Bounds); Color skinBackColor = currentSkin.CommonSkin.Colors["Control"]; if ((info.ViewInfo as ToggleSwitchViewInfo).BodyState == DevExpress.Utils.Drawing.ObjectState.Hot) { using (SolidBrush sb = new SolidBrush(ConvertColor(skinBackColor, 100))) { info.Graphics.FillRectangle(sb, bodyRect); } } bound.Width--; bound.Height--; info.Graphics.DrawRectangle(new Pen(borderColor), bound); }
internal Color GetGridLineColor() { Skin skin = VGridSkins.GetSkin(UserLookAndFeel.Default.ActiveLookAndFeel); SkinElement elem = skin[VGridSkins.SkinGridLine]; return(elem.Color.BackColor); }
private void btnClearImage_Click(object sender, EventArgs e) { SkinElement element = targetSkin[targetSkinElementNames[lbSkinElements.SelectedIndex]]; element.Image.Image = null; UpdateSkinElementImage(element); }
private Images GetImages() { Skin skin = EditorsSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default.ActiveLookAndFeel); SkinElement elem = skin[EditorsSkins.SkinCheckBox]; return(elem.Image.GetImages().Images); }
void SetElementColor(string elementName, Color c) { Skin currentSkin = FormSkins.GetSkin(defaultLookAndFeel1.LookAndFeel); SkinElement element = currentSkin[elementName]; element.Image.SetImage(GetImage(element.Image.Image, c), Color.Transparent); }
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); }
protected void UpdateBaseButtonAppearance(LayeredImageButton button, SkinElement element) { if (element == null) { return; } int activated = _skinWindow.Activated ? 0 : 1; UpdateControlAppearance(button, element); UpdateLocation(button, element); button.Size = element.FrameSize; if (element.Frames == null) { return; } int frames = element.Frames.Length / 2; if (frames == 1) { return; } button.BackgroundImage = element.Frames[0 + frames * activated]; button.HoverBackgroundImage = element.Frames[1 + frames * activated]; button.PressedBackgroundImage = (2 + frames * activated) < element.Frames.Length ? element.Frames[2 + frames * activated] : null; button.DisabledBackgroundImage = (3 + frames * activated) < element.Frames.Length ? element.Frames[3 + frames * activated] : null; }
public static ImageCollection GetComboImages() { Skin currentSkin = EditorsSkins.GetSkin(UserLookAndFeel.Default.ActiveLookAndFeel); SkinElement element = currentSkin[EditorsSkins.SkinSpinDown]; return(element.Image.GetImages()); }
private async void ChangeList_Revert_Click(object sender, RoutedEventArgs e) { var msgBox = MaterialMessageBox.Show(Helper.FindString("edit_revertTitle"), Helper.FindString("edit_revertDescription"), MessageBoxButton.YesNo); await DialogHost.Show(msgBox); if (msgBox.Result == MessageBoxResult.Yes) { SkinViewModel vm = (SkinViewModel)DataContext; SkinElement element = vm.LoadedSkin.Elements.FirstOrDefault(x => x.Name.Equals( (sender as Button).Tag)) ?? null; if (element != null) { element.Reset(); if (element.Equals(vm.SelectedElement)) { vm.RefreshImage(); vm.ResetEnabled = false; } } } }
private static SkinElement GetSkinElement() { Skin skin = EditorsSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default); SkinElement skinElement = skin["CheckBox"]; return(skinElement); }
public override void Apply() { HERO hero = Owner.GetComponent <HERO>(); foreach (KeyValuePair <int, Renderer[]> pair in renderers) { if (pair.Key == (int)HumanParts.Gas && Configuration.SkinSettings.DisableCustomGas.Value) { continue; } SkinElement skin = elements[pair.Key]; if (skin.IsDone && pair.Value != null) { foreach (Renderer render in pair.Value) { if (skin.IsTransparent) { render.enabled = false; continue; } if (hero.Setup.myCostume.hairInfo.id >= 0) { render.material = CharacterMaterials.Materials[hero.Setup.myCostume.hairInfo.texture]; } if (pair.Key == (int)HumanParts.Eyes || pair.Key == (int)HumanParts.Glass || pair.Key == (int)HumanParts.Face) { render.material.mainTextureScale *= 8f; render.material.mainTextureOffset = new Vector2(0f, 0f); } render.material.mainTexture = skin.Texture; } } } }
private void BindPropertyGrid() { SkinElement element = targetSkin[targetSkinElementNames[lbSkinElements.SelectedIndex]]; object attribute = element.GetType().InvokeMember(cbElementAttributes.SelectedItem.ToString(), BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetProperty, null, element, new object[] { }); pgSkinElementItem.SelectedObject = attribute; UpdateSkinElementImage(element); }
private void gridControl1_PaintEx(object sender, DevExpress.XtraGrid.PaintExEventArgs e) { SkinElement elem = GridSkins.GetSkin(this.gridControl1.LookAndFeel.ActiveLookAndFeel)[GridSkins.SkinGridLine]; e.Cache.DrawLine(e.Cache.GetPen(elem.Color.ForeColor), new Point(e.ClipRectangle.X, e.ClipRectangle.Top), new Point(e.ClipRectangle.Right, e.ClipRectangle.Top)); }
protected static void UpdateVerticalAlign(LayeredControl control, SkinElement element) { if (element == null) { return; } control.VerticalAlignment = element.ElementAlign; }
protected void ResetHeight(LayeredControl control, SkinElement element) { if (element == null) { return; } control.Height = element.FrameHeight; }
//public static ZContext mContext = new ZContext(); public FrmMain() { InitializeComponent(); Skin skin = TabSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default.ActiveLookAndFeel); SkinElement element = skin[TabSkins.SkinTabPane]; element.Color.BackColor = SystemColors.Control; element.Image.ImageCount = 0; }
public ReceiptPage() { InitializeComponent(); Skin tabSkin = TabSkins.GetSkin(xtraTabControl1.LookAndFeel); SkinElement element = tabSkin[TabSkins.SkinTabPane]; Image image = element.Image.Image; simpleButton1.BackColor = Color.Gray; simpleButton2.BackColor = Color.FromArgb(235, 236, 239); }
/// <summary> /// Disposes the control. /// </summary> /// <param name="disposing">Whether Dispose has been called.</param> protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { this.skinElement = null; this.borderElement = null; } }
protected virtual ImageCollection GetCheckBoxImages() { SkinElement skinElement = GetSkinElement(); if (skinElement == null) { return(null); } return(skinElement.Image.GetImages()); }
protected virtual SkinElement GetCheckBoxImages() { Skin skin = EditorsSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default); SkinElement skinElement = skin["CheckBox"]; if (skinElement == null) { return(null); } return(skinElement); }
protected void ChangeLayeredTextbox(LayeredTextbox textbox, SkinElement element) { UpdateBaseButtonAppearance(textbox, element); textbox.TextPadding = element.ContentPadding; textbox.StringFormat = element.TextFormat; textbox.TextColorBrush = element.GetTextBrush(_explorerSkinWindow.Parent.Maximized); textbox.Font = element.Font; textbox.TextVerticalAlignment = element.TextAlign; textbox.BackColor = element.BackColor; }
void DrawInfoText(ControlGraphicsInfoArgs info) { IPhoneCheckEditViewInfo view = (info.ViewInfo as IPhoneCheckEditViewInfo); Size infoTextSize = view.PaintAppearance.CalcTextSizeInt(info.Cache, view.InfoText, int.MaxValue); Point infoTextLocation = view.InfoTextLocation; infoTextLocation.Offset(-infoTextSize.Width / 2, -infoTextSize.Height / 2); SkinElement e = CommonSkins.GetSkin(view.LookAndFeel)[CommonSkins.SkinButton]; view.PaintAppearance.DrawString(info.Cache, view.InfoText, new Rectangle(infoTextLocation, infoTextSize), new SolidBrush(e.Color.GetForeColor())); }
void DrawButton(ControlGraphicsInfoArgs info) { IPhoneCheckEditViewInfo view = (info.ViewInfo as IPhoneCheckEditViewInfo); SkinElement e = CommonSkins.GetSkin(view.LookAndFeel)[CommonSkins.SkinButton]; SkinElementInfo ei = new SkinElementInfo(e, view.ButtonRect) { ImageIndex = view.ButtonImageIndex }; ObjectPainter.DrawObject(info.Cache, SkinElementPainter.Default, ei); }
protected void ChangeLayeredTextbox(LayeredTextbox textbox, SkinElement element) { UpdateBaseButtonAppearance(textbox, element); textbox.TextPadding = element.ContentPadding; textbox.StringFormat = element.TextFormat; textbox.TextColorBrush = element.GetTextBrush(_explorerSkinWindow.Parent.Maximized); textbox.Font = element.Font; textbox.TextVerticalAlignment = element.TextAlign; textbox.BackColor = element.BackColor; }
protected void UpdateLocation(LayeredControl control, SkinElement element) { if (element == null) { return; } Padding location = _skinWindow.Maximized ? element.MaxEdges : element.NormalEdges; control.Location = new Point(location.Left, location.Top); UpdateVerticalAlign(control, element); }
public frmEmployeeRestDay() { InitializeComponent(); EmployeeRestDayDALObj = new EmployeeRestDayDAL(); SkinElement element = SkinManager.GetSkinElement(SkinProductId.Editors, DevExpress.LookAndFeel.UserLookAndFeel.Default, EditorsSkins.SkinCheckBox); element.Size.MinSize = new System.Drawing.Size(18, 18); element.Image.Stretch = SkinImageStretch.Stretch; LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); }
Color GetBackColor() { if (ElementsLookAndFeel.ActiveStyle == ActiveLookAndFeelStyle.Skin) { SkinElement element = GridSkins.GetSkin(ElementsLookAndFeel)[GridSkins.SkinGridGroupPanel]; if (element.Color.BackColor2 != Color.Empty) { return(element.Color.BackColor2); } } return(LookAndFeelHelper.GetSystemColor(ElementsLookAndFeel, SystemColors.Control)); }
public static void UpdateSkin() { Skin skin = MapSkins.GetSkin(CustomSkinProvider.Default); Skin sourceSkin = MapSkins.GetSkin(DefaultSkinProvider.Default); SkinElement elem = sourceSkin[MapSkins.SkinCustomElement]; skin.RemoveElement(skin[MapSkins.SkinCustomElement]); SkinElement newElem = elem.Copy(skin); newElem.Info.ContentMargins = new SkinPaddingEdges(8); skin.AddElement(newElem); elem = CustomGalleryBorder; }
public void LoadAnimation(SkinElement element) { AnimationViewModel vm = DataContext as AnimationViewModel; vm.Animation.Clear(); vm.Animation.Add(element.GetAnimatedElements(), false); vm.CurrentFrame = 0; SkinningEntry details = element.ElementDetails as SkinningEntry; vm.FrameOrder = details.FrameOrder; }
protected override void FillBackground(GraphicsCache cache, Rectangle r) { if (LookAndFeel.ActiveLookAndFeel.Style == DevExpress.LookAndFeel.LookAndFeelStyle.Skin) { SkinElement element = CommonSkins.GetSkin(LookAndFeel)[CommonSkins.SkinForm]; SkinElementInfo info = new SkinElementInfo(element, r); ObjectPainter.DrawObject(cache, SkinElementPainter.Default, info); } else { cache.Graphics.FillRectangle(SystemBrushes.Control, r); } }
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); }
public SkinElement GetSkinElement(string ID) { if (!Exists(ID)) return null; var element = new SkinElement(); element.ID = ID; if (_skinIniFile.Exists(ID, SkinKeys.ImageFile)) { var imageFile = GetImageFile(ID); var framesNumber = _skinIniFile.GetValue(ID, SkinKeys.FramesNumber, 2); var image = new ImageWithDeviceContext(imageFile); element.Frames = ExtractFramesInImage(image, image.Height / framesNumber); var directoryPath = Path.GetDirectoryName(imageFile); if (directoryPath != null) { var fileName = Path.GetFileNameWithoutExtension(imageFile) + "MaskOut.png"; fileName = Path.Combine(directoryPath, fileName); if (File.Exists(fileName)) { element.MaskOutBitmap = new ImageWithDeviceContext(fileName); } } } if (_skinIniFile.Exists(ID, SkinKeys.Sizing)) element.StretchPadding = GetRect(ID, SkinKeys.Sizing); if (_skinIniFile.Exists(ID, SkinKeys.Content)) element.ContentPadding = GetRect(ID, SkinKeys.Content); if (_skinIniFile.Exists(ID, SkinKeys.Edges)) element.NormalEdges = GetRect(ID, SkinKeys.Edges); if (_skinIniFile.Exists(ID, SkinKeys.MaxEdges)) element.MaxEdges = GetRect(ID, SkinKeys.MaxEdges); if (_skinIniFile.Exists(ID, SkinKeys.ElementAlignment)) element.ElementAlign = GetAlignment(ID, SkinKeys.ElementAlignment); if (_skinIniFile.Exists(ID, SkinKeys.BackColor)) element.BackColor = GetColor(ID, SkinKeys.BackColor); if (_skinIniFile.Exists(ID, SkinKeys.TextColor)) element.NormalTextBrush = GetColorBrush(ID, SkinKeys.TextColor); if (_skinIniFile.Exists(ID, SkinKeys.MaxTextColor)) element.MaxTextBrush = GetColorBrush(ID, SkinKeys.MaxTextColor); if (_skinIniFile.Exists(ID, SkinKeys.TextAlignment)) element.TextAlign = GetAlignment(ID, SkinKeys.TextAlignment); if (_skinIniFile.Exists(ID, SkinKeys.Font)) { element.Font = GetFont(ID); element.TextFormat = new StringFormat(StringFormat.GenericTypographic) { FormatFlags = StringFormatFlags.NoWrap, Trimming = StringTrimming.EllipsisCharacter }; } return element; }