SND\eagleeyestudios_cp 8b735c16c2 Content Compiler:
- Added Developer Attributes & did some cleaning
- Fixed RibbonButton image aligning bug (Worldicon not centered)
- Added some comments to da code
- Implemented cleaning of ContentProject (Deleting bin files)
2012-09-10 19:10:39 +00:00

66 lines
1.9 KiB
C#

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Controls
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
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; }
}
private void RibbonButtonMouseEnter(object sender, EventArgs e)
{
BackColor = Settings.LightMainColor;
}
private void RibbonButtonMouseDown(object sender, MouseEventArgs e)
{
BackColor = Settings.AccentColor;
OnClick(new EventArgs());
}
private void RibbonButtonMouseUp(object sender, MouseEventArgs e)
{
BackColor = Settings.LightMainColor;
}
private void RibbonButtonMouseLeave(object sender, EventArgs e)
{
BackColor = Settings.MainColor;
}
private void RibbonButtonMouseHover(object sender, EventArgs e)
{
BackColor = Settings.LightMainColor;
}
private void RibbonButtonLoad(object sender, EventArgs e)
{
BackColor = Settings.MainColor;
ForeColor = Settings.ForeColor;
Refresh();
}
}
}