コード例 #1
0
ファイル: Project.cs プロジェクト: slgrobotics/QuakeMap
 private static void _ShowPopup(Control parent, string caption, Point location, bool mayBeToLeft)
 {
     try
     {
         if (currentPopup != null)
         {
             currentPopup.Dispose();
         }
         bool returnFocus = (parent != null && parent.Focused);
         currentPopup        = new PopupWindow(parent, caption, location, mayBeToLeft);
         currentPopupCreated = DateTime.Now;
         currentPopup.Show();
         if (returnFocus)
         {
             parent.Focus();
         }
     }
     catch (Exception e)
     {
         LibSys.StatusBar.Trace("popup: e=" + e.Message);
     }
 }
コード例 #2
0
ファイル: Project.cs プロジェクト: slgrobotics/QuakeMap
 private static void _ShowPopup(Control parent, string caption, Point location, bool mayBeToLeft)
 {
     try
     {
         if(currentPopup != null)
         {
             currentPopup.Dispose();
         }
         bool returnFocus = (parent != null && parent.Focused);
         currentPopup = new PopupWindow(parent, caption, location, mayBeToLeft);
         currentPopupCreated = DateTime.Now;
         currentPopup.Show();
         if(returnFocus)
         {
             parent.Focus();
         }
     }
     catch (Exception e)
     {
         LibSys.StatusBar.Trace("popup: e=" + e.Message);
     }
 }
コード例 #3
0
ファイル: Project.cs プロジェクト: slgrobotics/QuakeMap
 // called often from MainFrame, as part of periodicMaintenance()
 public static void popupMaintenance()
 {
     if(currentPopup != null && ((DateTime.Now - currentPopupCreated).Seconds > 10))
     {
         try
         {
             currentPopup.Dispose();
         }
         catch {}
         currentPopup = null;
     }
 }