/// <summary> /// Set up the hidden form. /// </summary> /// <param name="detector">StorageDetector object which will receive notification about USB drives, see WndProc</param> public DetectorForm(StorageDetector detector) { mDetector = detector; this.MinimizeBox = false; this.MaximizeBox = false; this.ShowInTaskbar = false; this.ShowIcon = false; this.FormBorderStyle = FormBorderStyle.None; this.Load += new System.EventHandler(this.Load_Form); this.Activated += new EventHandler(this.Form_Activated); }
/// <summary> /// Initializes a new instance of the <see cref="ProcessIcon"/> class. /// </summary> public ProcessIcon() { _policyForm = new PolicyForm(); _notifyIcon = new NotifyIcon(); _storageDetector = new StorageDetector(); _storageDetector.StorageDetected += Sd_StorageDetected; _notifyIcon.BalloonTipIcon = ToolTipIcon.Info; _notifyIcon.BalloonTipTitle = ConfigurationManager.AppSettings["StorageAddedMessageTitle"]; _notifyIcon.BalloonTipText = ConfigurationManager.AppSettings["StorageAddedMessageMessage"]; logger.Info("Created"); }