2012-08-26 19:03:12 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
2012-09-10 19:10:39 +00:00
|
|
|
|
using ANX.Framework.NonXNA.Development;
|
2012-08-26 19:03:12 +00:00
|
|
|
|
|
|
|
|
|
namespace ANX.ContentCompiler.GUI.Controls
|
|
|
|
|
{
|
2012-09-10 19:10:39 +00:00
|
|
|
|
[Developer("SilentWarrior/Eagle Eye Studios")]
|
|
|
|
|
[PercentageComplete(100)]
|
|
|
|
|
[TestState(TestStateAttribute.TestState.Tested)]
|
2012-08-26 19:03:12 +00:00
|
|
|
|
public partial class RibbonButton : UserControl
|
|
|
|
|
{
|
|
|
|
|
public RibbonButton()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Category("Content"), Description("Text der auf dem Button gezeigt werden soll.")]
|
|
|
|
|
public String Content
|
|
|
|
|
{
|
|
|
|
|
get { return labelText.Text; }
|
|
|
|
|
set { labelText.Text = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Category("Design"), Description("Das Bild, das als Icon dienen soll. (60x60)")]
|
|
|
|
|
public Image Image
|
|
|
|
|
{
|
|
|
|
|
get { return pictureBox.Image; }
|
|
|
|
|
set { pictureBox.Image = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-27 19:09:10 +00:00
|
|
|
|
private void RibbonButtonMouseEnter(object sender, EventArgs e)
|
2012-08-26 19:03:12 +00:00
|
|
|
|
{
|
2012-08-27 19:09:10 +00:00
|
|
|
|
BackColor = Settings.LightMainColor;
|
2012-08-26 19:03:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-08-27 19:09:10 +00:00
|
|
|
|
private void RibbonButtonMouseDown(object sender, MouseEventArgs e)
|
2012-08-26 19:03:12 +00:00
|
|
|
|
{
|
2012-08-27 19:09:10 +00:00
|
|
|
|
BackColor = Settings.AccentColor;
|
2012-08-26 19:03:12 +00:00
|
|
|
|
OnClick(new EventArgs());
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-27 19:09:10 +00:00
|
|
|
|
private void RibbonButtonMouseUp(object sender, MouseEventArgs e)
|
2012-08-26 19:03:12 +00:00
|
|
|
|
{
|
2012-08-27 19:09:10 +00:00
|
|
|
|
BackColor = Settings.LightMainColor;
|
2012-08-26 19:03:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-08-27 19:09:10 +00:00
|
|
|
|
private void RibbonButtonMouseLeave(object sender, EventArgs e)
|
2012-08-26 19:03:12 +00:00
|
|
|
|
{
|
2012-08-27 19:09:10 +00:00
|
|
|
|
BackColor = Settings.MainColor;
|
2012-08-26 19:03:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-08-27 19:09:10 +00:00
|
|
|
|
private void RibbonButtonMouseHover(object sender, EventArgs e)
|
2012-08-26 19:03:12 +00:00
|
|
|
|
{
|
2012-08-27 19:09:10 +00:00
|
|
|
|
BackColor = Settings.LightMainColor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void RibbonButtonLoad(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BackColor = Settings.MainColor;
|
|
|
|
|
ForeColor = Settings.ForeColor;
|
|
|
|
|
Refresh();
|
2012-08-26 19:03:12 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|