Decompile and Rebuild v0.1.2
begin work: base version 0993 move original program for orgnization golang work snapshot decompiled code it builds! (but doesnt run) source code bump library stash decompile 0.1.2, make it build
This commit is contained in:
commit
3e31aa0363
45 changed files with 7996 additions and 0 deletions
41
ControlApp/MyCustomApplicationContext.cs
Normal file
41
ControlApp/MyCustomApplicationContext.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ControlApp;
|
||||
|
||||
public class MyCustomApplicationContext : ApplicationContext
|
||||
{
|
||||
private NotifyIcon trayIcon;
|
||||
|
||||
public MyCustomApplicationContext()
|
||||
{
|
||||
trayIcon = new NotifyIcon();
|
||||
trayIcon.Icon = new Icon("App.ico");
|
||||
trayIcon.ContextMenuStrip = new ContextMenuStrip();
|
||||
trayIcon.ContextMenuStrip.Items.Add("Exit", null, Exit);
|
||||
trayIcon.ContextMenuStrip.Items.Add("Open", null, Open);
|
||||
trayIcon.ContextMenuStrip.Items.Add("Panic", null, Panic);
|
||||
trayIcon.Visible = true;
|
||||
}
|
||||
|
||||
private void Exit(object sender, EventArgs e)
|
||||
{
|
||||
trayIcon.Visible = false;
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void Open(object sender, EventArgs e)
|
||||
{
|
||||
using ControlApp myform = new ControlApp();
|
||||
myform.ShowDialog();
|
||||
}
|
||||
|
||||
private void Panic(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Form openForm in Application.OpenForms)
|
||||
{
|
||||
openForm.Close();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue