资源简介
代码片段和文件信息
using System.Drawing;
namespace MaterialSkin
{
public class ColorScheme
{
public readonly Color PrimaryColor DarkPrimaryColor LightPrimaryColor AccentColor TextColor;
public readonly Pen PrimaryPen DarkPrimaryPen LightPrimaryPen AccentPen TextPen;
public readonly Brush PrimaryBrush DarkPrimaryBrush LightPrimaryBrush AccentBrush TextBrush;
///
/// Defines the Color Scheme to be used for all forms.
///
/// The primary color a -500 color is suggested here.
/// A darker version of the primary color a -700 color is suggested here.
/// A lighter version of the primary color a -100 color is suggested here.
/// The accent color a -200 color is suggested here.
/// The text color the one with the highest contrast is suggested.
public ColorScheme(Primary primary Primary darkPrimary Primary lightPrimary Accent accent TextShade textShade)
{
//Color
PrimaryColor = ((int)primary).ToColor();
DarkPrimaryColor = ((int)darkPrimary).ToColor();
LightPrimaryColor = ((int)lightPrimary).ToColor();
AccentColor = ((int)accent).ToColor();
TextColor = ((int)textShade).ToColor();
//Pen
PrimaryPen = new Pen(PrimaryColor);
DarkPrimaryPen = new Pen(DarkPrimaryColor);
LightPrimaryPen = new Pen(LightPrimaryColor);
AccentPen = new Pen(AccentColor);
TextPen = new Pen(TextColor);
//Brush
PrimaryBrush = new SolidBrush(PrimaryColor);
DarkPrimaryBrush = new SolidBrush(DarkPrimaryColor);
LightPrimaryBrush = new SolidBrush(LightPrimaryColor);
AccentBrush = new SolidBrush(AccentColor);
TextBrush = new SolidBrush(TextColor);
}
}
public static class ColorExtension
{
///
/// Convert an integer number to a Color.
///
///
public static Color ToColor(this int argb)
{
return Color.FromArgb(
(argb & 0xff0000) >> 16
(argb & 0xff00) >> 8
argb & 0xff);
}
///
/// Removes the alpha component of a color.
///
///
///
public static Color RemoveAlpha(this Color color)
{
return Color.FromArgb(color.R color.G color.B);
}
///
/// Converts a 0-100 integer to a 0-255 color component.
///
///
///
public static int PercentageToColorComponent(t
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-12-06 10:21 MaterialSkin-master\
文件 2518 2019-12-06 10:21 MaterialSkin-master\.gitattributes
目录 0 2019-12-06 10:21 MaterialSkin-master\.github\
文件 773 2019-12-06 10:21 MaterialSkin-master\.github\FUNDING.yml
文件 2806 2019-12-06 10:21 MaterialSkin-master\.gitignore
文件 1078 2019-12-06 10:21 MaterialSkin-master\LICENSE
文件 1488 2019-12-06 10:21 MaterialSkin-master\MaterialSkin.sln
目录 0 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\
目录 0 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Animations\
文件 432 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Animations\AnimationDirection.cs
文件 13889 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Animations\AnimationManager.cs
文件 1194 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Animations\Animations.cs
文件 10880 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\ColorScheme.cs
目录 0 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\
文件 9575 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialCheckbox.cs
文件 7675 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialContextMenuStrip.cs
文件 634 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialDivider.cs
文件 6551 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialFlatButton.cs
文件 23408 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialForm.cs
文件 731 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialLabel.cs
文件 6759 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialListView.cs
文件 4980 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialMenuStrip.cs
文件 2925 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialProgressBar.cs
文件 8510 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialRadioButton.cs
文件 5090 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialRaisedButton.cs
文件 31060 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialSingleLineTextField.cs
文件 625 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialTabControl.cs
文件 7275 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\Controls\MaterialTabSelector.cs
文件 1846 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\DrawHelper.cs
文件 287 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\IMaterialControl.cs
文件 4526 2019-12-06 10:21 MaterialSkin-master\MaterialSkin\MaterialSkin.csproj
............此处省略28个文件信息
相关资源
- C#绘制波形界面
- C#开发的一个数据显示界面程序(Li
- C# winform简洁漂亮的图形界面库SunnyU
- WeChatSamplerBuilder控制台
- 倍福CNC 界面
- 桌面UI皮肤(IrisSkin)
- indentguide V14 for VS2012(.vsix)
- C#实现特殊主框架界面效果
- 重写winfrom UI控件
- USB读取PID和UID
- 服务端启动UI进程
- winform 界面图片轮播效果
- 好用的asp.net UI框架
- WeifenLuo.WinFormsUI.Docking3.1.0
- Bunifu_Ui_WinForms_v1.10.0.0_Downloadly.ir.rar
- ASP.NET MVC5+EasyUI企业开发框架源码
- 蚂蚁爬杆+图形界面+C#+ide=vs08
- MATLAB GUI设计学习手记(罗华飞)
- 2018CRM C# 源码基于小黄豆CRMv2.0.925.3版
- asp.net MVC5+EasyUI事例
- WPF漂亮倒计时界面
- C#界面美化 (最好用的免费的第三方
- winform 60种非常漂亮界面样式\\皮肤(
- C#编写ActiveX控件(纯接口,无界面)
- C#实现的基于BP神经网络的数据预测降
- C#上位机与单片机的完美结合内附有用
- C# WM wince UI集合版7 IN 1
- 健身俱乐部管理系统的设计与实现.
- C#图书管理系统源码(含数据库)-附
- winform 60种非常漂亮界面样式\\皮肤(
评论
共有 条评论