Refactorings

This commit is contained in:
2017-01-27 11:20:39 +01:00
parent 7983598bbe
commit ad041035f9
17 changed files with 101 additions and 305 deletions

View File

@@ -18,7 +18,7 @@ namespace ServerExplorer.Controls
[DllImport("User32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr h, int msg, int wParam, int[] lParam);
public void SetTabWidth(int tabWidth)
protected void SetTabWidth(int tabWidth)
{
SendMessage(this.Handle, EM_SETTABSTOPS, 1, new int[] { tabWidth * 4 });
}

View File

@@ -11,22 +11,22 @@ namespace ServerExplorer.Controls
{
#region Properties
private Form window = null;
private Form _window = null;
public Form Window
{
get { return window; }
set { window = value; }
get { return _window; }
set { _window = value; }
}
private bool active = false;
private bool _active = false;
public bool Active
{
get { return active; }
get { return _active; }
set
{
active = value;
_active = value;
//Font = active ? fntActive : fntNormal;
ForeColor = active ? Color.Black : Color.Gray;
ForeColor = _active ? Color.Black : Color.Gray;
}
}
@@ -47,8 +47,8 @@ namespace ServerExplorer.Controls
void WindowButton_Click(object sender, EventArgs e)
{
if (window == null) { return; }
window.Activate();
if (_window == null) { return; }
_window.Activate();
}
#endregion