Пример #1
0
        public AddDependencyPage(Action <string> updateParameterType, ISolution solution)
        {
            _typeValidator   = new CSharpTypeValidator();
            _solution        = solution;
            _continueEnabled = new Property <bool>("ContinueEnabled", true);

            var shellLocks = Shell.Instance.GetComponent <IShellLocks>();

            _typeEditBox = new CompletionPickerEdit(shellLocks, Shell.Instance.Components.Tooltips())
            {
                Width = 300,
            };
            var lifetime = this.DefineWinFormsLifetime();

            _typeEditBox.Settings.Value = TypeChooser.CreateSettings(
                lifetime,
                solution,
                LibrariesFlag.SolutionAndLibraries,
                CSharpLanguage.Instance,
                shellLocks);
            _typeEditBox.Text.Change.Advise_HasNew(
                lifetime,
                args =>
            {
                updateParameterType(args.New);
                UpdateUI();
            });

            Controls.Add(_typeEditBox);
        }
Пример #2
0
        public AddDependencyPage(Action<string> updateParameterType, ISolution solution)
        {
            _typeValidator = new CSharpTypeValidator();
            _solution = solution;
            _continueEnabled = new Property<bool>("ContinueEnabled", true);

            var shellLocks = Shell.Instance.GetComponent<IShellLocks>();
            _typeEditBox = new CompletionPickerEdit(shellLocks, Shell.Instance.Components.Tooltips())
                           {
                               Width = 300,
                           };
            var lifetime = this.DefineWinFormsLifetime();
            _typeEditBox.Settings.Value = TypeChooser.CreateSettings(
                lifetime,
                solution,
                LibrariesFlag.SolutionAndLibraries,
                CSharpLanguage.Instance,
                shellLocks);
            _typeEditBox.Text.Change.Advise_HasNew(
                lifetime,
                args =>
                {
                    updateParameterType(args.New);
                    UpdateUI();
                });

            Controls.Add(_typeEditBox);
        }
        public AddDependencyPage(Action<string> updateParameterType, ISolution solution)
        {
            _solution = solution;
            _continueEnabled = new Property<bool>("ContinueEnabled", true);

            _typeEditBox = new CompletionPickerEdit {Width = 300, Solution = solution};
            _typeEditBox.Settings.Value = TypeChooser.CreateSettings(
                solution,
                LibrariesFlag.SolutionAndLibraries,
                CSharpLanguageService.CSHARP);
            _typeEditBox.Text.Change.Advise_HasNew(
                args =>
                {
                    updateParameterType(args.New);
                    UpdateUI();
                });

            Controls.Add(_typeEditBox);
            _typeValidator = new CSharpTypeValidator();
        }
Пример #4
0
        public AddDependencyPage(Action <string> updateParameterType, ISolution solution)
        {
            _solution        = solution;
            _continueEnabled = new Property <bool>("ContinueEnabled", true);

            _typeEditBox = new CompletionPickerEdit {
                Width = 300, Solution = solution
            };
            _typeEditBox.Settings.Value = TypeChooser.CreateSettings(
                solution,
                LibrariesFlag.SolutionAndLibraries,
                CSharpLanguageService.CSHARP);
            _typeEditBox.Text.Change.Advise_HasNew(
                args =>
            {
                updateParameterType(args.New);
                UpdateUI();
            });

            Controls.Add(_typeEditBox);
            _typeValidator = new CSharpTypeValidator();
        }