Skip to content
Snippets Groups Projects
Commit e57943e1 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Initialize icons on declaration.

Refers to #2
parent 565275c1
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,11 @@ namespace ATXTray
private static long _txSize;
private readonly NotifyIcon _notifyIcon = new NotifyIcon();
private readonly Icon _tiDefault;
private readonly Icon _tiStopped;
private readonly Icon _tiSuspended;
private readonly Icon _tiTx0;
private readonly Icon _tiTx1;
private readonly Icon _tiDefault = new Icon("AutoTx.ico");
private readonly Icon _tiStopped = new Icon("icon-stopped.ico");
private readonly Icon _tiSuspended = new Icon("icon-suspended.ico");
private readonly Icon _tiTx0 = new Icon("icon-tx-0.ico");
private readonly Icon _tiTx1 = new Icon("icon-tx-1.ico");
private readonly ContextMenuStrip _cmStrip = new ContextMenuStrip();
private readonly ToolStripMenuItem _miExit = new ToolStripMenuItem();
private readonly ToolStripMenuItem _miTitle = new ToolStripMenuItem();
......@@ -44,11 +44,6 @@ namespace ATXTray
private readonly ToolStripMenuItem _miTxEnqueue = new ToolStripMenuItem();
public AutoTxTray() {
_tiDefault = new Icon("AutoTx.ico");
_tiStopped = new Icon("icon-stopped.ico");
_tiSuspended = new Icon("icon-suspended.ico");
_tiTx0 = new Icon("icon-tx-0.ico");
_tiTx1 = new Icon("icon-tx-1.ico");
_notifyIcon.Icon = _tiStopped;
_notifyIcon.Visible = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment