1
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
saviour-backup-system/Saviour Backup System/notificationIcon.cs

39 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Saviour_Backup_System
{
class notificationIcon
{
internal NotifyIcon notifyIcon = new NotifyIcon() ;
internal ContextMenu contextMenu = new ContextMenu();
internal notificationIcon()
{
notifyIcon.Text = "Saviour Backup System";
notifyIcon.Icon = Properties.Resources.redCDIconICO;
populateList();
notifyIcon.ContextMenu = contextMenu;
notifyIcon.Visible = true; //finally displays the tray icon
}
private void populateList()
{
contextMenu.MenuItems.Add("Show Interface", displayWindow);
}
private void displayWindow(object sender, EventArgs e) { setup.MW.showDisplay(); }
internal void displayStillRunning() {
notifyIcon.BalloonTipText = "Saviour backup system is still running in the background";
notifyIcon.BalloonTipTitle = "Still running...";
notifyIcon.ShowBalloonTip(2000);
}
}
}