• 大小: 2.8MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-29
  • 语言: C#
  • 标签:

资源简介

在开发winform客户端工具的时候,限于微软自带的控件样式单一,且不想花钱购买第三方控件集。可考虑IrisSkin4进行简单美化。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        //加载皮肤              
        Sunisoft.IrisSkin.SkinEngine skin = new Sunisoft.IrisSkin.SkinEngine();

        public Form1()
        {
            InitializeComponent();
            LoadFiles();     
        }


        private void LoadFiles()
        {
            DirectoryInfo dir = new DirectoryInfo(Application.StartupPath + @“\IrisSkin4\Skins\“);
            FileInfo[] files = dir.GetFiles();
            int rows = 0;
            int k = 0;
            for (int i = 0; i < files.Length; i++)
            {
                if (i != 0 && i % 4 == 0)
                {
                    rows++;
                    k = 1;
                }
                else
                {
                    k++;
                }
                
                Button btn = new Button();
                btn.Width = 120;
                btn.BackColor = Color.White;
                btn.Text = files[i].Name;
                btn.Location = new Point(140 * (k-1) + 10 30 * rows);
                btn.Click += new EventHandler(btn_Click);
                panel1.Controls.Add(btn);
            }
        }

        private void btn_Click(object senderEventArgs e)
        {
            skin.SkinFile = Application.StartupPath + @“\IrisSkin4\Skins\“+((Button)sender).Text;          
         
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-11-18 14:46  WindowsFormsApplication1\
     目录           0  2015-11-18 14:59  WindowsFormsApplication1\WindowsFormsApplication1\
     文件        9795  2015-11-18 15:14  WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
     文件        1651  2015-11-18 15:22  WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
     文件        5817  2015-11-18 15:14  WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
     目录           0  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\
     文件      557056  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\IrisSkin4.dll
     目录           0  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\
     文件       20139  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\Calmness.ssk
     文件       20271  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\CalmnessColor1.ssk
     文件       20208  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\CalmnessColor2.ssk
     文件        5032  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DeepCyan.ssk
     文件        5037  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DeepGreen.ssk
     文件        4908  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DeepOrange.ssk
     文件       16021  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DiamondBlue.ssk
     文件       16669  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DiamondGreen.ssk
     文件       16211  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DiamondOlive.ssk
     文件       16031  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DiamondPurple.ssk
     文件       15998  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\DiamondRed.ssk
     文件       10439  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\Eighteen.ssk
     文件       10382  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\EighteenColor1.ssk
     文件        9746  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\EighteenColor2.ssk
     文件       12591  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\Emerald.ssk
     文件       12261  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\EmeraldColor1.ssk
     文件       12360  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\EmeraldColor2.ssk
     文件       11422  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\EmeraldColor3.ssk
     文件       18859  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\GlassBrown.ssk
     文件       16097  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\GlassGreen.ssk
     文件       17010  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\GlassOrange.ssk
     文件       18988  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\Longhorn.ssk
     文件       16292  2015-11-18 14:46  WindowsFormsApplication1\WindowsFormsApplication1\IrisSkin4\Skins\MSN.ssk
............此处省略159个文件信息

评论

共有 条评论