/// <summary> /// Main Class for RegistryMonitor. /// </summary> public Form1() { if (_allowLogging) { ExceptionlessClient.Default.Register(false); ExceptionlessClient.Default.Configuration.SetUserIdentity(Environment.MachineName); ExceptionlessClient.Default.Configuration.UseSessions(); } InitializeComponent(); _loadedSettings = new LoadedSettings(); LoadMenu(); _hkManager = new HotKeyManager(); LoadGlobalHotkey(); _menuStrip = menuStrip; // Gets the location of the systray icon _superNotifyIcon = new SuperNotifyIcon { NotifyIcon = Icon }; _locationOfIcon = _superNotifyIcon.GetLocation(); _settingsAlreadyRunning = false; }
public MainWindow() { InitializeComponent(); this.Hide(); var ni = new SuperNotifyIcon(); ni.NotifyIcon.Icon = new System.Drawing.Icon("Upload.ico"); ni.NotifyIcon.Text = "Yo Mama"; ni.NotifyIcon.Visible = true; ni.InitDrop(); ni.DragEnter += ni_DragEnter; ni.DragDrop += ni_DragDrop; Closing += (sender, e) => ni.Dispose(); }