Ejemplo n.º 1
0
        private void NewCmdletWidget()
        {
            var newTool = CmdletTool.PickTool(ChaosShell);

            if (newTool == null)
            {
                return;
            }

            AddToolWidget(newTool);
        }
        private void SetToolCmdlet()
        {
            var result = MessageBox.Show("Changing the cmdlet will remove all parameters and references. Are you sure you want to do this?", "Tool Configuration", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result != MessageBoxResult.Yes)
            {
                return;
            }

            var newTool = CmdletTool.PickTool(_shellHost);

            if (newTool == null)
            {
                return;
            }

            if (Tool != null && Tool.ToString() != Tool.Nickname)
            {
                newTool.Nickname = Tool.Nickname;
            }

            Tool = newTool;
            RefreshTool();
        }