private void onSlideShowBegin(object sender)
 {
     if (WindowsInteropFunctions.presenterActive)
     {
         if (customPresenterIsEnabledForPresenterMode)
         {
             Logger.Info("starting simplePens for presenter presentation mode");
             SSSW = new SimplePenWindow();
             SSSW.Show();
         }
     }
     else
     {
         if (customPresenterIsEnabledForDefaultMode)
         {
             Logger.Info("starting simplePens for presenter presentation mode");
             SSSW = new SimplePenWindow();
             SSSW.Show();
         }
     }
 }
 private void onSlideShowEnd(object sender)
 {
     if (SSSW != null)
     {
         Logger.Info("Slideshow ended");
         SSSW.Close();
         SSSW = null;
     }
 }
 private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
 {
     if (SSSW != null)
     {
         Logger.Info("Shutting down SimplePens");
         SSSW.Close();
         SSSW = null;
     }
     ThisAddIn.instance = null;
 }