コード例 #1
0
        public static void OpenPopup(Point Position)
        {
            if (current != null)
            {
                current.Closed -= Current_Closed;
                current.Close();
            }

            current         = new ShortcutMenuWindow(Position);
            current.Closed += Current_Closed;
            current.Show();
            current.Activate();
        }
コード例 #2
0
 void Cursor_Released(object sender, CursorReleasedArgs e)
 {
     Window.Dispatcher.Invoke(() =>
     {
         if (e.Duration > Settings.Current.CursorOpenMenuWaitDuration)
         {
             Window.Click(false);
             ShortcutMenuWindow.OpenPopup(new System.Windows.Point(Window.ActualLeft, Window.ActualTop));
         }
         else
         {
             Window.Click();
         }
     });
 }
コード例 #3
0
 static void Current_Closed(object sender, EventArgs e)
 {
     current = null;
 }