2011-12-17 05:22:40 -04:00
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
namespace ArdupilotMega
|
|
|
|
|
{
|
2012-01-27 04:01:28 -04:00
|
|
|
|
public partial class ImageLabel : UserControl
|
2011-12-17 05:22:40 -04:00
|
|
|
|
{
|
|
|
|
|
public new event EventHandler Click;
|
|
|
|
|
|
|
|
|
|
private Image picture;
|
|
|
|
|
private string text;
|
|
|
|
|
|
|
|
|
|
public ImageLabel()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setImageandText(Image image, string text)
|
|
|
|
|
{
|
|
|
|
|
pictureBox1.Image = image;
|
|
|
|
|
label1.Text = text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[System.ComponentModel.Browsable(true)]
|
|
|
|
|
public Image Image {
|
|
|
|
|
get { return picture; }
|
|
|
|
|
set { picture = value; pictureBox1.Image = picture; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[System.ComponentModel.Browsable(true)]
|
|
|
|
|
public override string Text
|
|
|
|
|
{
|
|
|
|
|
get { return text; }
|
|
|
|
|
set { text = value; label1.Text = text; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void pictureBox1_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (Click != null)
|
|
|
|
|
{
|
|
|
|
|
Click(sender,new EventArgs());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|