• 大小: 351KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: C#
  • 标签:

资源简介

c# 重写的listbox 有比较好看的样式

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
using System.Diagnostics;
using CSharpWin;

namespace CSharpWinDemo
{
    partial class AboutBoxCSharpWinDemo : SkinForm
    {
        #region Fileds

        private string _url = “www.csharpwin.com“;

        #endregion

        #region Constructors

        public AboutBoxCSharpWinDemo()
        {
            InitializeComponent();

            //  初始化 AboutBox 以显示程序集信息中包含的产品信息。
            //  也可以通过以下方法更改应用程序的程序集信息设置:
            //  - 项目->属性->应用程序->程序集信息
            //  - AssemblyInfo.cs
            this.Text = String.Format(“关于 {0}“ Assemblytitle);
            this.labelProductName.Text = AssemblyProduct;
            this.labelVersion.Text = String.Format(“版本 {0}“ AssemblyVersion);
            this.labelCopyright.Text = AssemblyCopyright;
            this.labelCompanyName.Text = AssemblyCompany;
            this.textBoxDescription.Text = AssemblyDescription;
            this.labelAuthor.Text = “作者:starts_2000  Email:starts_2000@qq.com“;
            this.linkLabelWebUrl.Text = “CS 程序员之窗“;

            InitEvents();
        }

        #endregion

        #region Properties

        [DefaultValue(“www.csharpwin.com“)]
        public string Url
        {
            get { return _url; }
            set { _url = value; }
        }

        #endregion

        #region InitEvents

        private void InitEvents()
        {
            linkLabelWebUrl.Click += delegate(object sender EventArgs e)
            {
                Process.Start(_url);
            };

            logoPictureBox.Click += delegate(object sender EventArgs e)
            {
                Process.Start(_url);
            };
        }

        #endregion

        #region 程序集属性访问器

        public string Assemblytitle
        {
            get
            {
                // 获取此程序集上的所有 title 属性
                object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblytitleAttribute) false);
                // 如果至少有一个 title 属性
                if (attributes.Length > 0)
                {
                    // 请选择第一个属性
                    AssemblytitleAttribute titleAttribute = (AssemblytitleAttribute)attributes[0];
                    // 如果该属性为非空字符串,则将其返回
                    if (titleAttribute.title != ““)
                        return titleAttribute.title;
                }
                // 如果没有 title 属性,或者 title 属性为一个空字符串,则返回 .exe 的名称
                return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Codebase);
            }
        }

        public string AssemblyVersion
        {
            get
            {
                return Assembly.GetExecutingAssembly().GetName().Version.ToString();
            }
        }

        public string AssemblyDescripti

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      20480  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\dll\ArtTextLabel.dll

     文件      28672  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\dll\ButtonEx.dll

     文件      53248  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\dll\OwnerDrawSystemMenu.dll

     文件      57344  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\dll\SkinForm.dll

     文件      20480  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\dll\SystemMenu.dll

     文件       8124  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\Pic\Logo.jpg

     文件       4700  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\Pic\MlogoBack.png

     文件        249  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\Properties\Settings.settings

     文件       4371  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Properties\Resources.Designer.cs

     文件       1108  2009-11-16 18:29  ListBoxDemo-1\ListBoxDemo-1\Properties\Settings.Designer.cs

     文件       7429  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Properties\Resources.resx

     文件       1362  2009-11-16 21:33  ListBoxDemo-1\ListBoxDemo-1\Properties\AssemblyInfo.cs

     文件       7128  2009-11-17 10:33  ListBoxDemo-1\ListBoxDemo-1\FormCSharpWinDemo.Designer.cs

     文件      20343  2009-11-17 10:33  ListBoxDemo-1\ListBoxDemo-1\FormCSharpWinDemo.resx

     文件       2291  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Resources\favorite.ico

     文件       2291  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Resources\folder.ico

     文件       2291  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Resources\hard drive.ico

     文件       2291  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Resources\help.ico

     文件       2291  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Resources\history.ico

     文件       2291  2009-11-16 21:00  ListBoxDemo-1\ListBoxDemo-1\Resources\my computer.ico

     文件       3321  2009-11-17 10:33  ListBoxDemo-1\ListBoxDemo-1\FormCSharpWinDemo.cs

     文件       5632  2005-11-11 22:25  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\ListBoxDemo-1.vshost.exe

     文件      20480  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\ArtTextLabel.dll

     文件      28672  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\ButtonEx.dll

     文件      36864  2009-11-17 10:31  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\ListBoxEx.dll

     文件      53248  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\OwnerDrawSystemMenu.dll

     文件      57344  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\SkinForm.dll

     文件      20480  2009-11-16 18:28  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\SystemMenu.dll

     文件      48640  2009-11-17 10:31  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\ListBoxEx.pdb

     文件      57344  2009-11-17 10:32  ListBoxDemo-1\ListBoxDemo-1\bin\Debug\ListBoxDemo-1.exe

............此处省略60个文件信息

评论

共有 条评论

相关资源