/// <summary> /// Handles click on the Main button. By default shows/hides Buttonstack, /// with CTRL pressed shows Run dialog instead, and with CTRL+SHIFT in DEBUG /// mode shows RestartExplorer instance for purposes of localization /// </summary> private void ShowButtonStack(object sender, RoutedEventArgs e) { if(!BtnStck.IsInstantited) return; KillArrow(); if ((Control.ModifierKeys & Keys.Control) > 0) { #if DEBUG if ((Control.ModifierKeys & Keys.Shift) > 0) { new RestartExplorer().ShowDialog(); return; } #endif ShowRunDialog(this, null); return; } MfuList.UpdateStartMfu(); BtnStck.Instance.Show();//XP:955ms 0_o var screenPoint = new API.POINT(); API.GetCursorPos(ref screenPoint); GetSetWndPosition(BtnStck.Instance, screenPoint, sender == Keyboard.PrimaryDevice && SettingsManager.Instance.AltZAutoCornerEnabled); // ^^^ means "Command came from KB and Auto-cornering enabled" }
public static extern bool GetCursorPos(out POINT lpPoint);