Archived
Added: global hot keys + notify icon
This commit is contained in:
1 parent
045b55dbb3
commit
0f03a26a4c
4 files changed
+93
-20
No files matched your search
+39
-14
@@ -22,6 +22,8 @@ namespace AppLauncher.Windows.Forms
|
||||
protected internal RyzStudio.Windows.Forms.TImageBox imageBox1;
|
||||
private NotifyIcon notifyIcon1;
|
||||
private Panel panel1;
|
||||
private ContextMenuStrip contextMenuStrip1;
|
||||
private ToolStripMenuItem exitToolStripMenuItem;
|
||||
private IContainer components;
|
||||
|
||||
public AForm() : base()
|
||||
@@ -192,13 +194,16 @@ namespace AppLauncher.Windows.Forms
|
||||
this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox1)).BeginInit();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// imageBox3
|
||||
//
|
||||
//
|
||||
this.imageBox3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox3.ErrorImage = null;
|
||||
@@ -215,9 +220,9 @@ namespace AppLauncher.Windows.Forms
|
||||
this.imageBox3.TabIndex = 146;
|
||||
this.imageBox3.TabStop = false;
|
||||
this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick);
|
||||
//
|
||||
//
|
||||
// imageBox2
|
||||
//
|
||||
//
|
||||
this.imageBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox2.ErrorImage = null;
|
||||
@@ -234,9 +239,9 @@ namespace AppLauncher.Windows.Forms
|
||||
this.imageBox2.TabIndex = 147;
|
||||
this.imageBox2.TabStop = false;
|
||||
this.imageBox2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick);
|
||||
//
|
||||
//
|
||||
// imageBox1
|
||||
//
|
||||
//
|
||||
this.imageBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox1.ErrorImage = null;
|
||||
@@ -253,14 +258,17 @@ namespace AppLauncher.Windows.Forms
|
||||
this.imageBox1.TabIndex = 148;
|
||||
this.imageBox1.TabStop = false;
|
||||
this.imageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick);
|
||||
//
|
||||
//
|
||||
// notifyIcon1
|
||||
//
|
||||
//
|
||||
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
|
||||
this.notifyIcon1.Visible = true;
|
||||
this.notifyIcon1.Click += new System.EventHandler(this.notifyIcon1_Click);
|
||||
//
|
||||
this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Cursor = System.Windows.Forms.Cursors.SizeNS;
|
||||
this.panel1.Location = new System.Drawing.Point(109, 114);
|
||||
@@ -271,9 +279,23 @@ namespace AppLauncher.Windows.Forms
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);
|
||||
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
|
||||
this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseUp);
|
||||
//
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exitToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(94, 26);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(93, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// AForm
|
||||
//
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(421, 321);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.imageBox1);
|
||||
@@ -284,6 +306,7 @@ namespace AppLauncher.Windows.Forms
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox1)).EndInit();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -294,7 +317,7 @@ namespace AppLauncher.Windows.Forms
|
||||
{
|
||||
//this.WindowState = FormWindowState.Minimized;
|
||||
this.Visible = false;
|
||||
notifyIcon1.Visible = true;
|
||||
//notifyIcon1.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +346,7 @@ namespace AppLauncher.Windows.Forms
|
||||
private void notifyIcon1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Visible = !this.Visible;
|
||||
notifyIcon1.Visible = !this.Visible;
|
||||
//notifyIcon1.Visible = !this.Visible;
|
||||
}
|
||||
|
||||
private void panel1_MouseDown(object sender, MouseEventArgs e)
|
||||
@@ -348,5 +371,7 @@ namespace AppLauncher.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,9 @@
|
||||
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>130, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="notifyIcon1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
Reference in new issue
Block a user