• C# 常见命名空间、控件添加引用


    2020-07-06

    System.Windows.Forms

    引用,右键-》添加引用-》程序集-》System.Windows.Forms  4.0.0.0 选中-》确定

    System.Drawing

    引用,右键-》添加引用-》程序集-》System.Drawing  4.0.0.0 选中-》确定

     VBPowerPack下载链接 及安装教程

      IrisSkin   下载链接 WinForm换肤 换肤使用代码:

    private static Sunisoft.IrisSkin.SkinEngine SkinEngine = new Sunisoft.IrisSkin.SkinEngine();
            /// <summary>
            /// winform换肤
            /// </summary>
            /// <param name="fullPath">.ssk文件全路径</param>
            public static void CheckIris(string fullPath)
            {
                if (!fullPath.EndsWith(".ssk")) { MessageBox.Show($"输入路径:{fullPath},不是以“.ssk”结尾,文件类型异常"); }
                if (!File.Exists(fullPath)) { MessageBox.Show($"未找到文件:{fullPath}"); }
    
                SkinEngine.SkinFile = fullPath;
                SkinEngine.Active = true;
            }
            /// <summary>
            /// winform还原为原皮肤
            /// </summary>
            public static void Restore()
            {
                SkinEngine.Active = false;
            }
    View Code

    2020-07-17

     MaterialSkin.dll  下载链接 换肤 需要使用Material控件 

    引用: 引用MaterialSkin.dll或在NuGet包搜索MaterialSkin 安装插件   

    命名空间: 需要using MaterialSkin.Controls;using MaterialSkin;

    示例:  使用MaterialForm,创建winform后更改继承父类即可

     更改主题颜色:代码示例

    public Form1()
    {
        InitializeComponent();
    
        var materialSkinManager = MaterialSkinManager.Instance;
        materialSkinManager.AddFormToManage(this);
        materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
        materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
    }
    View Code

    在工具箱中添加MaterialSkin.dll 中的控件   需要在 工具箱->选项卡->右键->选择项->浏览->添加dll ->确定 

     

     

     

  • 相关阅读:
    MySQL批量更新字段url链接中的域名
    巧用Win+R
    斯坦福高效睡眠法
    chkconfig: command not found
    Nginx(./configure --help)
    Ubuntu16.04配置Tomcat的80端口访问
    Binary Tree Level Order Traversal
    java——Arrays.asList()方法
    python 发送邮件
    常用邮件协议
  • 原文地址:https://www.cnblogs.com/-hwh/p/13253180.html
Copyright © 2020-2023  润新知