public void PerformChangeBackgroundStripe(BackgroundStripe backgroundStripe) { try { ChangeBackgroundStripe(backgroundStripe); } catch { throw; } finally { this.ResumeRedraw(); } }
public static void ChangeBackgroundStripe(BackgroundStripe backgroundStripe, Control control) { if (backgroundStripe != BackgroundStripe.Default) { switch (backgroundStripe) { case BackgroundStripe.淡淡墨绿: break; case BackgroundStripe.芙蓉轻粉: ChangeSkinColor(SkinColor.草莓, control); break; case BackgroundStripe.荷叶嫩绿: ChangeSkinColor(SkinColor.青草, control); break; case BackgroundStripe.橘黄雪花: ChangeSkinColor(SkinColor.橘子, control); break; case BackgroundStripe.清雅幽兰: break; case BackgroundStripe.空灵淡蓝: ChangeSkinColor(SkinColor.灰蓝, control); break; case BackgroundStripe.柔和雅灰: break; case BackgroundStripe.腊梅飘香: ChangeSkinColor(SkinColor.OFFICE, control); break; case BackgroundStripe.白色: ChangeSkinColor(SkinColor.White, control); break; default: break; } } Shared.MainForm.CurrentSkinColor = Shared.CurrentSkinColor; }
protected BackgroundStripe GetBackgroundStripeEnum(string stripe) { BackgroundStripe c = BackgroundStripe.Default; if (!string.IsNullOrEmpty(stripe)) { foreach (Enum i in Enum.GetValues(typeof(BackgroundStripe))) { if (i.ToString() == stripe) { // c = (BackgroundStripe)Enum.Parse(typeof(BackgroundStripe), i.ToString()); c = (BackgroundStripe)i; return(c); } } } return(c); }
public override void ChangeBackgroundStripe(BackgroundStripe backgroundStripe) { if (backgroundStripe != BackgroundStripe.Default) { Stream map = Shared.AssemblyWinUI.GetManifestResourceStream("CRD.WinUI.Resources.MainWin.Shading." + backgroundStripe.GetHashCode() + ".png"); this.ptbTopLeft.Image = Mergerimg(map); this.ReSetFormBitmap(); Shared.ChangeBackgroundStripe(backgroundStripe, this); } else { this.ptbTopLeft.Image = null; ReSetFormBitmap(); } base.ChangeBackgroundStripe(backgroundStripe); }
public virtual void ChangeBackgroundStripe(BackgroundStripe backgroundStripe) { this.CurrentSkinColor = Shared.CurrentSkinColor; }