|
/////////////////////////////////////////
// Simple event remember used WPF and MS SQL Server 2005
// Autor Bruh Andrey. June 2006
/////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
namespace Remember_v
{
/// <summary>
/// Tray icon component
/// </summary>
public partial class Trey : Component
{
#region Data
/// <summary>
/// Main class
/// </summary>
private Window1 win = null;
#endregion
#region Constructor
/// <summary>
/// Constructor
/// </summary>
public Trey(Window1 wnd)
{
win = wnd;
InitializeComponent();
showWindow.Click += new EventHandler(show_Click);
hideWindow.Click += new EventHandler(hide_Click);
showWindow.Enabled = false;
}
#endregion
#region Methods
/// <summary>
/// Hide
/// </summary>
public void hide_Click(object sender, EventArgs e)
{
showWindow.Enabled = true;
hideWindow.Enabled = false;
win.Hide();
}
/// <summary>
/// Show
/// </summary>
void show_Click(object sender, EventArgs e)
{
showWindow.Enabled = false;
hideWindow.Enabled = true;
win.Show();
win.Activate();
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.