/// <summary> /// Load application /// </summary> private static void LoadApp() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Run Lync registry modifcations Lync.CreateLyncMenu(); //Run registry Watcher Lync.RegistryWatcher(); //Get shared instance of LyncClientController - pass to other instances that require it LyncClientController lyncClientController = new LyncClientController(); //Run Lync Presence Switcher LyncPresenceSwitcher lyncPresenceSwitcher = new LyncPresenceSwitcher(); lyncPresenceSwitcher.lync = lyncClientController; settingsBox = new SettingsBox(); settingsBox.lync = lyncClientController; //settingsBox.ShowDialog(); #if DEBUG //new VideoPlayer().ShowDialog(); #endif //Video offer service var videoOfferService = new VideoOfferService(); // Show the system tray icon. //using (ProcessIcon pi = new ProcessIcon()) using (ProcessIcon pi = new ProcessIcon()) { //Use to pass instance of ProcessIcon lyncPresenceSwitcher.processIcon = pi; videoOfferService.processIcon = pi; //Pass Lync instance pi.lync = lyncClientController; pi.Display(); // Make sure the application runs! Application.Run(); } }