基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Control;
|
||||
|
||||
namespace Lskj.ProductPlatform
|
||||
{
|
||||
public partial class ToolButton : UserControl
|
||||
{
|
||||
|
||||
public event EventHandler OnClick;
|
||||
public ToolButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public void SetImage(Image image)
|
||||
{
|
||||
if (image != null)
|
||||
this.panel1.BackgroundImage = image;
|
||||
}
|
||||
|
||||
public void OnClickCallBack()
|
||||
{
|
||||
if (OnClick != null)
|
||||
{
|
||||
OnClick(this, null);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTitle(string title)
|
||||
{
|
||||
this.label1.Text = title;
|
||||
}
|
||||
|
||||
private void panel1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.OnClickCallBack();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.OnClickCallBack();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToolButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.OnClickCallBack();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user