Пример #1
0
        private void btnFindShit_Click(object sender, EventArgs e)
        {
            var controllers = _controllerDomain.FindControllers();

            _contrCount = controllers.Count();
            _stinckData = _controllerDomain.FindStinck(controllers);

            UpdateForm();
        }
Пример #2
0
        public override void Invoke()
        {
            var stickProcessor = new ControllerDomain(_codeModel.Parent.ContainingProject);

            var stincks = stickProcessor.FindStinck(new[] { _controller });
            var stinck  = stincks.FirstOrDefault();

            var form = new SelectElementsForm();

            form.SetWindowData(stinck, _actionName == null ? RefactorTarget.ServiceActions : RefactorTarget.ServiceAction, _actionName);

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                stickProcessor.FindControllerRelativeClasses(stinck.Name);
                var result = stickProcessor.GenerateRefactoringCode(form.GetData());
                stickProcessor.AddToProject(result);
            }
        }