Commit [814775] Maximize Restore History

Reverting the conversion to WPF

Uri Kogan Uri Kogan 2010-05-11

added BtProxLock.resx
added Program.cs
removed downarrow.png
removed uparrow.png
changed BtProxLock.cs
changed BtProxLockWpf.xaml
changed BtProxLockWpf.xaml.cs
changed LanguageResources.Designer.cs
changed LanguageResources.resx
changed NumericUpDown.xaml
changed NumericUpDown.xaml.cs
changed btprox.csproj
copied TaskbarIcon.cs -> Form1.Designer.cs
BtProxLock.resx Diff Switch to side-by-side view
Loading...
Program.cs Diff Switch to side-by-side view
Loading...
downarrow.png
File was removed.
uparrow.png
File was removed.
BtProxLock.cs Diff Switch to side-by-side view
Loading...
BtProxLockWpf.xaml Diff Switch to side-by-side view
Loading...
BtProxLockWpf.xaml.cs Diff Switch to side-by-side view
Loading...
LanguageResources.Designer.cs Diff Switch to side-by-side view
Loading...
LanguageResources.resx Diff Switch to side-by-side view
Loading...
NumericUpDown.xaml Diff Switch to side-by-side view
Loading...
NumericUpDown.xaml.cs Diff Switch to side-by-side view
Loading...
btprox.csproj Diff Switch to side-by-side view
Loading...
TaskbarIcon.cs to Form1.Designer.cs
--- a/TaskbarIcon.cs
+++ b/Form1.Designer.cs
@@ -1,249 +1,387 @@
-ďťżusing System;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Reflection;
-using System.Collections.Generic;
-using System.IO;
-
-namespace btprox
+ďťżnamespace btprox
 {
-    internal class TaskbarIcon
+    partial class BtProxLock
     {
         /// <summary>
-        /// possible icon types
+        /// Required designer variable.
         /// </summary>
-        internal enum IconType
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
         {
-            Idle,
-            Pending,
-            Unloaded,
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
         }
 
+        #region Windows Form Designer generated code
+
         /// <summary>
-        /// actual icon shown in the tray
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
         /// </summary>
-        private readonly NotifyIcon m_icon;
-
-        /// <summary>
-        /// menu attached to the icon
-        /// </summary>
-        private ContextMenuStrip m_menu;
-
-        /// <summary>
-        /// icon used when the service is running and device is connected
-        /// </summary>
-        private Icon m_icoIdle;
-
-        /// <summary>
-        /// icon used when the service is running and device is disconnected
-        /// </summary>
-        private Icon m_icoPending;
-
-        /// <summary>
-        /// icon used when the service is not running
-        /// </summary>
-        private Icon m_icoUnloaded;
-
-        /// <summary>
-        /// event thrown on "Restore" context menu click
-        /// </summary>
-        public event EventHandler RestoreWindow = delegate { };
-
-        /// <summary>
-        /// event thrown on "Abort pending lock" click
-        /// </summary>
-        public event EventHandler AbortPendingLockHandler = delegate { };
-
-        /// <summary>
-        /// default icon handler constructor
-        /// </summary>
-        internal TaskbarIcon()
+        private void InitializeComponent()
         {
-            LoadIcons();
-
-            BuildMenu();
-
-            m_icon = new NotifyIcon();
-            m_icon.DoubleClick += (sender, e) => RestoreWindow(this, e);
-            m_icon.MouseClick += (sender, e) => MouseClickHandler(e);
-            m_icon.ContextMenuStrip = m_menu;
-            m_icon.Visible = true;
-            m_icon.Icon = m_icoUnloaded;
-
-            InitializeLanguageControls();
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BtProxLock));
+            this.m_exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.m_aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.m_labelUsedDevices = new System.Windows.Forms.Label();
+            this.m_buttonHide = new System.Windows.Forms.Button();
+            this.m_buttonExit = new System.Windows.Forms.Button();
+            this.m_labelTimeout = new System.Windows.Forms.Label();
+            this.m_labelMinutes = new System.Windows.Forms.Label();
+            this.m_labelLockCommand = new System.Windows.Forms.Label();
+            this.m_labelReleaseCommand = new System.Windows.Forms.Label();
+            this.m_settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
+            this.trayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+            this.m_restoreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.m_abortPendingLockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.m_buttonStart = new System.Windows.Forms.Button();
+            this.m_buttonStop = new System.Windows.Forms.Button();
+            this.statusStrip = new System.Windows.Forms.StatusStrip();
+            this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
+            this.buttonSelect = new System.Windows.Forms.Button();
+            this.m_deviceLabel = new System.Windows.Forms.Label();
+            this.timeoutBox = new System.Windows.Forms.NumericUpDown();
+            this.lockCommandBox = new System.Windows.Forms.TextBox();
+            this.buttonSelectLockCommand = new System.Windows.Forms.Button();
+            this.buttonSelectUnlockCommand = new System.Windows.Forms.Button();
+            this.unlockCommandBox = new System.Windows.Forms.TextBox();
+            this.m_checkBoxSkipLock = new System.Windows.Forms.CheckBox();
+            this.mainMenu = new System.Windows.Forms.MenuStrip();
+            this.trayMenu.SuspendLayout();
+            this.statusStrip.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.timeoutBox)).BeginInit();
+            this.mainMenu.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // m_exitToolStripMenuItem
+            // 
+            this.m_exitToolStripMenuItem.Name = "m_exitToolStripMenuItem";
+            this.m_exitToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
+            this.m_exitToolStripMenuItem.Text = "E&xit";
+            this.m_exitToolStripMenuItem.Click += new System.EventHandler(this.ExitClickHandler);
+            // 
+            // m_aboutToolStripMenuItem
+            // 
+            this.m_aboutToolStripMenuItem.Name = "m_aboutToolStripMenuItem";
+            this.m_aboutToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
+            this.m_aboutToolStripMenuItem.Text = "&About";
+            this.m_aboutToolStripMenuItem.Click += new System.EventHandler(this.AboutMenuItemHandler);
+            // 
+            // m_labelUsedDevices
+            // 
+            this.m_labelUsedDevices.AutoSize = true;
+            this.m_labelUsedDevices.Location = new System.Drawing.Point(5, 35);
+            this.m_labelUsedDevices.Name = "m_labelUsedDevices";
+            this.m_labelUsedDevices.Size = new System.Drawing.Size(70, 13);
+            this.m_labelUsedDevices.TabIndex = 5;
+            this.m_labelUsedDevices.Text = "Used device:";
+            // 
+            // m_buttonHide
+            // 
+            this.m_buttonHide.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.m_buttonHide.Location = new System.Drawing.Point(120, 180);
+            this.m_buttonHide.Name = "m_buttonHide";
+            this.m_buttonHide.Size = new System.Drawing.Size(50, 23);
+            this.m_buttonHide.TabIndex = 5;
+            this.m_buttonHide.Text = "&Hide";
+            this.m_buttonHide.UseVisualStyleBackColor = true;
+            this.m_buttonHide.Click += new System.EventHandler(this.HideClickHandler);
+            // 
+            // m_buttonExit
+            // 
+            this.m_buttonExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.m_buttonExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.m_buttonExit.Location = new System.Drawing.Point(176, 180);
+            this.m_buttonExit.Name = "m_buttonExit";
+            this.m_buttonExit.Size = new System.Drawing.Size(50, 23);
+            this.m_buttonExit.TabIndex = 6;
+            this.m_buttonExit.Text = "E&xit";
+            this.m_buttonExit.UseVisualStyleBackColor = true;
+            this.m_buttonExit.Click += new System.EventHandler(this.ExitClickHandler);
+            // 
+            // m_labelTimeout
+            // 
+            this.m_labelTimeout.AutoSize = true;
+            this.m_labelTimeout.Location = new System.Drawing.Point(5, 53);
+            this.m_labelTimeout.Name = "m_labelTimeout";
+            this.m_labelTimeout.Size = new System.Drawing.Size(48, 13);
+            this.m_labelTimeout.TabIndex = 7;
+            this.m_labelTimeout.Text = "Timeout:";
+            // 
+            // m_labelMinutes
+            // 
+            this.m_labelMinutes.AutoSize = true;
+            this.m_labelMinutes.Location = new System.Drawing.Point(187, 53);
+            this.m_labelMinutes.Name = "m_labelMinutes";
+            this.m_labelMinutes.Size = new System.Drawing.Size(44, 13);
+            this.m_labelMinutes.TabIndex = 7;
+            this.m_labelMinutes.Text = "Minutes";
+            // 
+            // m_labelLockCommand
+            // 
+            this.m_labelLockCommand.Location = new System.Drawing.Point(5, 74);
+            this.m_labelLockCommand.Name = "m_labelLockCommand";
+            this.m_labelLockCommand.Size = new System.Drawing.Size(190, 13);
+            this.m_labelLockCommand.TabIndex = 7;
+            this.m_labelLockCommand.Text = "Lock command:";
+            // 
+            // m_labelReleaseCommand
+            // 
+            this.m_labelReleaseCommand.Location = new System.Drawing.Point(5, 113);
+            this.m_labelReleaseCommand.Name = "m_labelReleaseCommand";
+            this.m_labelReleaseCommand.Size = new System.Drawing.Size(190, 13);
+            this.m_labelReleaseCommand.TabIndex = 7;
+            this.m_labelReleaseCommand.Text = "Release command:";
+            // 
+            // m_settingsToolStripMenuItem
+            // 
+            this.m_settingsToolStripMenuItem.Name = "m_settingsToolStripMenuItem";
+            this.m_settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
+            this.m_settingsToolStripMenuItem.Text = "&Options";
+            this.m_settingsToolStripMenuItem.Click += new System.EventHandler(this.OptionsMenuItem);
+            // 
+            // notifyIcon
+            // 
+            this.notifyIcon.BalloonTipText = "Bluetooth Proximity Lock";
+            this.notifyIcon.ContextMenuStrip = this.trayMenu;
+            this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
+            this.notifyIcon.Text = "Stopped";
+            this.notifyIcon.Visible = true;
+            this.notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.MouseClickHandler);
+            this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TrayIconDoubleClick);
+            // 
+            // trayMenu
+            // 
+            this.trayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.m_restoreToolStripMenuItem,
+            this.m_abortPendingLockToolStripMenuItem,
+            this.m_aboutToolStripMenuItem,
+            this.m_exitToolStripMenuItem});
+            this.trayMenu.Name = "trayMenu";
+            this.trayMenu.Size = new System.Drawing.Size(177, 92);
+            // 
+            // m_restoreToolStripMenuItem
+            // 
+            this.m_restoreToolStripMenuItem.Name = "m_restoreToolStripMenuItem";
+            this.m_restoreToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
+            this.m_restoreToolStripMenuItem.Text = "&Restore";
+            this.m_restoreToolStripMenuItem.Click += new System.EventHandler(this.ContextMenuRestore);
+            // 
+            // m_abortPendingLockToolStripMenuItem
+            // 
+            this.m_abortPendingLockToolStripMenuItem.Name = "m_abortPendingLockToolStripMenuItem";
+            this.m_abortPendingLockToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
+            this.m_abortPendingLockToolStripMenuItem.Text = "Abo&rt pending lock";
+            this.m_abortPendingLockToolStripMenuItem.Click += new System.EventHandler(this.AbortPendingLockHandler);
+            // 
+            // m_buttonStart
+            // 
+            this.m_buttonStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.m_buttonStart.Location = new System.Drawing.Point(8, 180);
+            this.m_buttonStart.Name = "m_buttonStart";
+            this.m_buttonStart.Size = new System.Drawing.Size(50, 23);
+            this.m_buttonStart.TabIndex = 3;
+            this.m_buttonStart.Text = "&Start";
+            this.m_buttonStart.UseVisualStyleBackColor = true;
+            this.m_buttonStart.Click += new System.EventHandler(this.StartClickHandler);
+            // 
+            // m_buttonStop
+            // 
+            this.m_buttonStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.m_buttonStop.Location = new System.Drawing.Point(64, 180);
+            this.m_buttonStop.Name = "m_buttonStop";
+            this.m_buttonStop.Size = new System.Drawing.Size(50, 23);
+            this.m_buttonStop.TabIndex = 4;
+            this.m_buttonStop.Text = "S&top";
+            this.m_buttonStop.UseVisualStyleBackColor = true;
+            this.m_buttonStop.Click += new System.EventHandler(this.StopClickHandler);
+            // 
+            // statusStrip
+            // 
+            this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripStatusLabel});
+            this.statusStrip.Location = new System.Drawing.Point(0, 206);
+            this.statusStrip.Name = "statusStrip";
+            this.statusStrip.Size = new System.Drawing.Size(238, 22);
+            this.statusStrip.SizingGrip = false;
+            this.statusStrip.TabIndex = 3;
+            this.statusStrip.Text = "Stopped";
+            // 
+            // toolStripStatusLabel
+            // 
+            this.toolStripStatusLabel.Name = "toolStripStatusLabel";
+            this.toolStripStatusLabel.Size = new System.Drawing.Size(51, 17);
+            this.toolStripStatusLabel.Text = "Stopped";
+            // 
+            // buttonSelect
+            // 
+            this.buttonSelect.Location = new System.Drawing.Point(196, 27);
+            this.buttonSelect.Name = "buttonSelect";
+            this.buttonSelect.Size = new System.Drawing.Size(30, 23);
+            this.buttonSelect.TabIndex = 0;
+            this.buttonSelect.Text = "...";
+            this.buttonSelect.UseVisualStyleBackColor = true;
+            this.buttonSelect.Click += new System.EventHandler(this.SelectDeviceClickHandler);
+            // 
+            // m_deviceLabel
+            // 
+            this.m_deviceLabel.AutoSize = true;
+            this.m_deviceLabel.Location = new System.Drawing.Point(99, 35);
+            this.m_deviceLabel.Name = "m_deviceLabel";
+            this.m_deviceLabel.Size = new System.Drawing.Size(53, 13);
+            this.m_deviceLabel.TabIndex = 6;
+            this.m_deviceLabel.Text = "Unknown";
+            // 
+            // timeoutBox
+            // 
+            this.timeoutBox.Location = new System.Drawing.Point(102, 51);
+            this.timeoutBox.Name = "timeoutBox";
+            this.timeoutBox.Size = new System.Drawing.Size(79, 20);
+            this.timeoutBox.TabIndex = 1;
+            this.timeoutBox.ValueChanged += new System.EventHandler(this.TimeoutValueChanged);
+            // 
+            // lockCommandBox
+            // 
+            this.lockCommandBox.Location = new System.Drawing.Point(8, 90);
+            this.lockCommandBox.Name = "lockCommandBox";
+            this.lockCommandBox.Size = new System.Drawing.Size(187, 20);
+            this.lockCommandBox.TabIndex = 2;
+            this.lockCommandBox.TextChanged += new System.EventHandler(this.LockCommandChangedHandler);
+            // 
+            // buttonSelectLockCommand
+            // 
+            this.buttonSelectLockCommand.Location = new System.Drawing.Point(201, 88);
+            this.buttonSelectLockCommand.Name = "buttonSelectLockCommand";
+            this.buttonSelectLockCommand.Size = new System.Drawing.Size(30, 23);
+            this.buttonSelectLockCommand.TabIndex = 0;
+            this.buttonSelectLockCommand.Text = "...";
+            this.buttonSelectLockCommand.UseVisualStyleBackColor = true;
+            this.buttonSelectLockCommand.Click += new System.EventHandler(this.SelectLockCommand);
+            // 
+            // buttonSelectUnlockCommand
+            // 
+            this.buttonSelectUnlockCommand.Location = new System.Drawing.Point(201, 127);
+            this.buttonSelectUnlockCommand.Name = "buttonSelectUnlockCommand";
+            this.buttonSelectUnlockCommand.Size = new System.Drawing.Size(30, 23);
+            this.buttonSelectUnlockCommand.TabIndex = 0;
+            this.buttonSelectUnlockCommand.Text = "...";
+            this.buttonSelectUnlockCommand.UseVisualStyleBackColor = true;
+            this.buttonSelectUnlockCommand.Click += new System.EventHandler(this.SelectUnlockCommand);
+            // 
+            // unlockCommandBox
+            // 
+            this.unlockCommandBox.Location = new System.Drawing.Point(8, 129);
+            this.unlockCommandBox.Name = "unlockCommandBox";
+            this.unlockCommandBox.Size = new System.Drawing.Size(187, 20);
+            this.unlockCommandBox.TabIndex = 2;
+            this.unlockCommandBox.TextChanged += new System.EventHandler(this.UnlockCommandChangedHandler);
+            // 
+            // m_checkBoxSkipLock
+            // 
+            this.m_checkBoxSkipLock.AutoSize = true;
+            this.m_checkBoxSkipLock.Location = new System.Drawing.Point(26, 155);
+            this.m_checkBoxSkipLock.Name = "m_checkBoxSkipLock";
+            this.m_checkBoxSkipLock.Size = new System.Drawing.Size(187, 17);
+            this.m_checkBoxSkipLock.TabIndex = 8;
+            this.m_checkBoxSkipLock.Text = "Don\'t lock (only run the command)";
+            this.m_checkBoxSkipLock.UseVisualStyleBackColor = true;
+            this.m_checkBoxSkipLock.CheckedChanged += new System.EventHandler(this.LockSkipStateChanged);
+            // 
+            // mainMenu
+            // 
+            this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.m_settingsToolStripMenuItem});
+            this.mainMenu.Location = new System.Drawing.Point(0, 0);
+            this.mainMenu.Name = "mainMenu";
+            this.mainMenu.Size = new System.Drawing.Size(238, 24);
+            this.mainMenu.TabIndex = 9;
+            this.mainMenu.Text = "menuStrip1";
+            // 
+            // BtProxLock
+            // 
+            this.AcceptButton = this.m_buttonStart;
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.m_buttonExit;
+            this.ClientSize = new System.Drawing.Size(238, 228);
+            this.Controls.Add(this.statusStrip);
+            this.Controls.Add(this.mainMenu);
+            this.Controls.Add(this.m_checkBoxSkipLock);
+            this.Controls.Add(this.lockCommandBox);
+            this.Controls.Add(this.m_deviceLabel);
+            this.Controls.Add(this.timeoutBox);
+            this.Controls.Add(this.m_labelMinutes);
+            this.Controls.Add(this.unlockCommandBox);
+            this.Controls.Add(this.m_labelTimeout);
+            this.Controls.Add(this.m_labelLockCommand);
+            this.Controls.Add(this.m_buttonExit);
+            this.Controls.Add(this.m_labelReleaseCommand);
+            this.Controls.Add(this.m_labelUsedDevices);
+            this.Controls.Add(this.buttonSelect);
+            this.Controls.Add(this.m_buttonStop);
+            this.Controls.Add(this.m_buttonStart);
+            this.Controls.Add(this.buttonSelectLockCommand);
+            this.Controls.Add(this.m_buttonHide);
+            this.Controls.Add(this.buttonSelectUnlockCommand);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.HelpButton = true;
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.MainMenuStrip = this.mainMenu;
+            this.Name = "BtProxLock";
+            this.Text = "Bluetooth Proximity Lock";
+            this.SizeChanged += new System.EventHandler(this.BtProxSizeChanged);
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormClosedHandler);
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormClosingHandler);
+            this.trayMenu.ResumeLayout(false);
+            this.statusStrip.ResumeLayout(false);
+            this.statusStrip.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.timeoutBox)).EndInit();
+            this.mainMenu.ResumeLayout(false);
+            this.mainMenu.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
         }
 
-        private void BuildMenu()
-        {
-            /* newly created menu item */
-            ToolStripItem tsi;
-
-            m_menu = new ContextMenuStrip();
-
-            tsi = m_menu.Items.Add("Restore");
-            tsi.Click += (sender, e) => RestoreWindow(this, e);
-
-            tsi = m_menu.Items.Add("Abort pending lock");
-            tsi.Click += (sender, e) => AbortPendingLockHandler(this, e);
-        }
-
-        /// <summary>
-        /// handler of tray notification icon event
-        /// </summary>
-        ///
-        ///<param name="e">
-        /// event arguments
-        /// </param>
-        private static void MouseClickHandler(MouseEventArgs e)
-        {
-            /* handle only right mouse key */
-            if (e.Button != MouseButtons.Right)
-            {
-                return;
-            }
-        }
-
-        /// <summary>
-        /// initializes all the controls with their translations
-        /// </summary>
-        private void InitializeLanguageControls()
-        {
-            /* resource manager used to pull data */
-            //var rmg = new ResourceManager(
-            //    "btprox.LanguageResources",
-            //    Assembly.GetExecutingAssembly());
-
-            //m_restoreToolStripMenuItem.Text = rmg.GetString("menuItemRestore");
-            //m_abortPendingLockToolStripMenuItem.Text =
-            //    rmg.GetString("menuItemAbortLock");
-            //m_aboutToolStripMenuItem.Text = rmg.GetString("menuItemAbout");
-            //m_exitToolStripMenuItem.Text = rmg.GetString("menuItemExit");
-        }
-
-        /// <summary>
-        /// show ballon tip on the icon
-        /// </summary>
-        ///
-        /// <param name="timeout">
-        /// timeout for this ballon
-        /// </param>
-        ///
-        /// <param name="title">
-        /// ballon title
-        /// </param>
-        ///
-        /// <param name="msg">
-        /// message inside the ballon
-        /// </param>
-        ///
-        /// <param name="icon">
-        /// icon of the ballon
-        /// </param>
-        internal void ShowBalloonTip(int timeout,
-            string title,
-            string msg,
-            ToolTipIcon icon)
-        {
-            m_icon.ShowBalloonTip(timeout, title, msg, icon);
-        }
-
-        /// <summary>
-        /// update notify icon in GUI thread
-        /// </summary>
-        ///
-        /// <param name="text">
-        /// text to set for notification icon
-        /// </param>
-        ///
-        /// <param name="icon">
-        /// updated icon image
-        /// </param>
-        internal void UpdateNotifyIcon(String text, IconType icon)
-        {
-            switch (icon)
-            {
-                case IconType.Idle:
-                    m_icon.Icon = m_icoIdle;
-                    break;
-                case IconType.Pending:
-                    m_icon.Icon = m_icoPending;
-                    break;
-                case IconType.Unloaded:
-                    m_icon.Icon = m_icoUnloaded;
-                    break;
-                default:
-                    m_icon.Icon = m_icoUnloaded;
-                    break;
-            }
-            m_icon.Text = text;
-        }
-
-        /// <summary>
-        /// load all the used icons from embedded resources
-        /// </summary>
-        private void LoadIcons()
-        {
-            /* assembly currently executing */
-            var asm = Assembly.GetExecutingAssembly();
-
-            /* names of resources placed in current assembly */
-            var arrRes = new List<String>(asm.GetManifestResourceNames());
-
-            /* steam used to read icons */
-            Stream strm;
-
-            if (arrRes.Contains("btprox.orange.ico"))
-            {
-                strm = asm.GetManifestResourceStream("btprox.orange.ico");
-                try
-                {
-                    if (strm != null)
-                    {
-                        m_icoIdle = new Icon(strm);
-                    }
-                }
-                // ReSharper disable EmptyGeneralCatchClause
-                catch { }
-                // ReSharper restore EmptyGeneralCatchClause
-            }
-
-            if (arrRes.Contains("btprox.pink.ico"))
-            {
-                strm = asm.GetManifestResourceStream("btprox.pink.ico");
-                try
-                {
-                    if (strm != null)
-                    {
-                        m_icoPending = new Icon(strm);
-                    }
-                }
-                // ReSharper disable EmptyGeneralCatchClause
-                catch { }
-                // ReSharper restore EmptyGeneralCatchClause
-            }
-
-            if (arrRes.Contains("btprox.silver.ico"))
-            {
-                strm = asm.GetManifestResourceStream("btprox.silver.ico");
-                try
-                {
-                    if (strm != null)
-                    {
-                        m_icoUnloaded = new Icon(strm);
-                    }
-                }
-                // ReSharper disable EmptyGeneralCatchClause
-                catch { }
-                // ReSharper restore EmptyGeneralCatchClause
-            }
-        }
-
-        /// <summary>
-        /// hide the notification icon
-        /// </summary>
-        public void Hide()
-        {
-            m_icon.Visible = false;
-        }
+        #endregion
+
+        private System.Windows.Forms.NotifyIcon notifyIcon;
+        private System.Windows.Forms.StatusStrip statusStrip;
+        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel;
+        private System.Windows.Forms.Button buttonSelect;
+        private System.Windows.Forms.Label m_deviceLabel;
+        private System.Windows.Forms.NumericUpDown timeoutBox;
+        private System.Windows.Forms.Button m_buttonStart;
+        private System.Windows.Forms.Button m_buttonStop;
+        private System.Windows.Forms.ContextMenuStrip trayMenu;
+        private System.Windows.Forms.ToolStripMenuItem m_restoreToolStripMenuItem;
+        private System.Windows.Forms.TextBox lockCommandBox;
+        private System.Windows.Forms.Button buttonSelectLockCommand;
+        private System.Windows.Forms.ToolStripMenuItem m_abortPendingLockToolStripMenuItem;
+        private System.Windows.Forms.Button buttonSelectUnlockCommand;
+        private System.Windows.Forms.TextBox unlockCommandBox;
+        private System.Windows.Forms.CheckBox m_checkBoxSkipLock;
+        private System.Windows.Forms.MenuStrip mainMenu;
+        private System.Windows.Forms.Button m_buttonHide;
+        private System.Windows.Forms.Button m_buttonExit;
+        private System.Windows.Forms.ToolStripMenuItem m_settingsToolStripMenuItem;
+        private System.Windows.Forms.Label m_labelUsedDevices;
+        private System.Windows.Forms.Label m_labelTimeout;
+        private System.Windows.Forms.Label m_labelLockCommand;
+        private System.Windows.Forms.Label m_labelReleaseCommand;
+        private System.Windows.Forms.Label m_labelMinutes;
+        private System.Windows.Forms.ToolStripMenuItem m_exitToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem m_aboutToolStripMenuItem;
     }
 }
+