update to latest version

This commit is contained in:
Merith 2025-02-28 11:27:06 -08:00
parent b69a6ae4a1
commit ddd2ea9eb5
41 changed files with 7918 additions and 7943 deletions

View file

@ -1,41 +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();
}
}
}
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();
}
}
}