mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-24 08:46:35 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
67
UsingControl/Controls/CButton.cs
Normal file
67
UsingControl/Controls/CButton.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Controls.Properties;
|
||||
|
||||
namespace Controls
|
||||
{
|
||||
public delegate void DClicked();
|
||||
public partial class CButton : UserControl
|
||||
{
|
||||
public CButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
btn_button.Text = TextStr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击事件
|
||||
/// </summary>
|
||||
public event DClicked Clicked;
|
||||
/// <summary>
|
||||
/// 文本
|
||||
/// </summary>
|
||||
private string _textStr = "Button";
|
||||
public string TextStr
|
||||
{
|
||||
get { return _textStr; }
|
||||
set
|
||||
{
|
||||
_textStr = value;
|
||||
btn_button.Text = value;
|
||||
}
|
||||
}
|
||||
private void btn_button_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
btn_button.BackgroundImage = Resources.ButtonEnter;
|
||||
Application.DoEvents();
|
||||
}
|
||||
private void btn_button_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
btn_button.BackgroundImage = Resources.ButtonDown;
|
||||
Application.DoEvents();
|
||||
}
|
||||
private void btn_button_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
btn_button.BackgroundImage = Resources.ButtonUp;
|
||||
Application.DoEvents();
|
||||
}
|
||||
private void btn_button_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
btn_button.BackgroundImage = Resources.ButtonUp;
|
||||
Application.DoEvents();
|
||||
}
|
||||
private void btn_button_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Clicked != null)
|
||||
Clicked();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user