• 大小: 0.06M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 控件  

资源简介


【核心代码】

/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 2016/12/18 星期日
 * Time: 下午 7:34
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace mybutton
{
	/// <summary>
	/// Description of UserControl1.
	/// </summary>
	public partial class UserControl1 : UserControl
	{
		public UserControl1()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			button1.FlatStyle=FlatStyle.Flat;
			button1.BackColor=Color.Red;
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		bool isRun=false;
		void Button1Click(object sender, EventArgs e)
		{
			isRun=!isRun;
			if(isRun)
			{
				button1.BackColor=Color.Green;
			}
			else
			{
				button1.BackColor=Color.Red;
			}
		}
	}
}

资源截图

代码片段和文件信息

/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 2016/12/18 星期日
 * Time: 下午 7:34
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace mybutton
{
/// 
/// Description of UserControl1.
/// 

public partial class UserControl1 : UserControl
{
public UserControl1()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
button1.Flatstyle=Flatstyle.Flat;
button1.BackColor=Color.Red;
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
bool isRun=false;
void Button1Click(obje

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

     文件       6144  2016-12-18 19:37  test1\mybutton\bin\Debug\mybutton.dll

     文件      13824  2016-12-18 19:37  test1\mybutton\bin\Debug\mybutton.pdb

     文件       2900  2016-12-18 19:37  test1\mybutton\mybutton.csproj

     文件        428  2016-12-18 19:32  test1\mybutton\obj\Debug\mybutton.csproj.FileListAbsolute.txt

     文件        909  2016-12-18 19:37  test1\mybutton\obj\Debug\mybutton.csproj.GenerateResource.Cache

     文件     163617  2016-12-18 17:35  test1\mybutton\obj\Debug\mybutton.csprojResolveAssemblyReference.cache

     文件       6144  2016-12-18 19:37  test1\mybutton\obj\Debug\mybutton.dll

     文件      13824  2016-12-18 19:37  test1\mybutton\obj\Debug\mybutton.pdb

     文件        180  2016-12-18 19:37  test1\mybutton\obj\Debug\mybutton.UserControl1.resources

     文件       1073  2016-12-18 15:30  test1\mybutton\Properties\AssemblyInfo.cs

     文件        990  2016-12-18 19:37  test1\mybutton\UserControl1.cs

     文件       1954  2016-12-18 19:37  test1\mybutton\UserControl1.Designer.cs

     文件       5817  2016-12-18 19:37  test1\mybutton\UserControl1.resx

     文件        173  2016-12-18 15:16  test1\test1\app.config

     文件       6144  2016-12-18 19:37  test1\test1\bin\Debug\mybutton.dll

     文件      13824  2016-12-18 19:37  test1\test1\bin\Debug\mybutton.pdb

     文件       6144  2016-12-18 19:37  test1\test1\bin\Debug\test1.exe

     文件        173  2016-12-18 15:16  test1\test1\bin\Debug\test1.exe.config

     文件      17920  2016-12-18 19:37  test1\test1\bin\Debug\test1.pdb

     文件        692  2016-12-18 15:16  test1\test1\MainForm.cs

     文件       1849  2016-12-18 16:52  test1\test1\MainForm.Designer.cs

     文件       5817  2016-12-18 16:52  test1\test1\MainForm.resx

     文件        527  2016-12-18 16:52  test1\test1\obj\Debug\test1.csproj.FileListAbsolute.txt

     文件        905  2016-12-18 16:52  test1\test1\obj\Debug\test1.csproj.GenerateResource.Cache

     文件     163165  2016-12-18 19:37  test1\test1\obj\Debug\test1.csprojResolveAssemblyReference.cache

     文件       6144  2016-12-18 19:37  test1\test1\obj\Debug\test1.exe

     文件        180  2016-12-18 19:37  test1\test1\obj\Debug\test1.MainForm.resources

     文件      17920  2016-12-18 19:37  test1\test1\obj\Debug\test1.pdb

     文件        653  2016-12-18 15:16  test1\test1\Program.cs

     文件       1067  2016-12-18 15:16  test1\test1\Properties\AssemblyInfo.cs

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

评论

共有 条评论