static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var setting = ConfigurationManager.AppSettings["TestMode"]; if (!String.IsNullOrEmpty(setting) && Convert.ToBoolean(setting) == true) { // Show the system tray icon. using (PolicyForm pf = new PolicyForm()) { pf.Show(); // Make sure the application runs! Application.Run(); } } else { // Show the system tray icon. using (ProcessIcon pi = new ProcessIcon()) { pi.Display(); // Make sure the application runs! Application.Run(); } } }
private void Sd_StorageDetected(object sender, StorageDetectorEventArgs e) { _notifyIcon.ShowBalloonTip(5000); _policyForm.Drive = e.Drive; _policyForm.Show(); }