Exemplo n.º 1
0
        /// <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"
        }
Exemplo n.º 2
0
 /// <summary>
 /// Handles DragDrop event putting file names to custom MFU list
 /// </summary>
 private void Power8Drop(object sender, DragEventArgs e)
 {
     foreach (var fileOrFolder in (string[])e.Data.GetData(DataFormats.FileDrop))
     {
         MfuList.Add2Custom(null, fileOrFolder);
     }
     MfuList.UpdateStartMfu(); //we use 2nd way to invoke Add2Cutsom, so must
     //update the MFU list explicitly
 }