FrmPrincipal: Lista de ventanas (tipo tabs)

This commit is contained in:
2013-11-24 19:04:06 +01:00
parent 3f994390b9
commit b2d7fda236
8 changed files with 168 additions and 28 deletions

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace ServerExplorer.Controls
{
public class WindowButton : Button
{
#region Properties
private Form window = null;
public Form Window
{
get { return window; }
set { window = value; }
}
private bool active = false;
public bool Active
{
get { return active; }
set
{
active = value;
//Font = active ? fntActive : fntNormal;
ForeColor = active ? Color.Black : Color.Gray;
}
}
#endregion
#region Creator
public WindowButton()
{
AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
Click += WindowButton_Click;
}
#endregion
#region Events
void WindowButton_Click(object sender, EventArgs e)
{
if (window == null) { return; }
window.Activate();
}
#endregion
}
}