Esempio n. 1
0
        private void savedMI_OnClick(object sender, RoutedEventArgs e)
        {
            if (!CmdArgsCtxMenu_SavedMenu.IsEnabled)
            {
                return;
            }

            MenuItem mi   = sender as MenuItem;
            string   args = ((TextBlock)mi.ToolTip).Text;

            IDEUtils.SetCommandArgs(args);

            foreach (MenuItem savedMI in CmdArgsCtxMenu_SavedMenu.Items)
            {
                if (((TextBlock)savedMI.ToolTip).Text == args)
                {
                    savedMI.IsChecked = true;
                }
                else
                {
                    savedMI.IsChecked = false;
                }
            }

            runChangedHandler = false;
            CmdArgs.Text      = IDEUtils.GetCommandArgs();
            runChangedHandler = true;
        }
Esempio n. 2
0
 private void OnTextChanged(object sender, EventArgs e)
 {
     if (runChangedHandler)
     {
         IDEUtils.SetCommandArgs(CmdArgs.Text);
     }
 }
Esempio n. 3
0
        private void historyMI_OnClick(object sender, RoutedEventArgs e)
        {
            MenuItem mi   = sender as MenuItem;
            string   args = ((TextBlock)mi.Header).Text;

            IDEUtils.SetCommandArgs(args);

            foreach (MenuItem historyMI in CmdArgsCtxMenu_HistoryMenu.Items)
            {
                if (((TextBlock)historyMI.Header).Text == args)
                {
                    historyMI.IsChecked = true;
                }
                else
                {
                    historyMI.IsChecked = false;
                }
            }

            runChangedHandler = false;
            CmdArgs.Text      = IDEUtils.GetCommandArgs();
            runChangedHandler = true;
        }
Esempio n. 4
0
 private void OnCmdArgsCtxMenu_Paste(object sender, RoutedEventArgs e)
 {
     CmdArgs.Paste();
     IDEUtils.SetCommandArgs(CmdArgs.Text);
 }