Interaction logic for ToolWindowControl.
Inheritance: System.Windows.Controls.UserControl
コード例 #1
0
        public ToolWindow(CmdArgsPackage package, ViewModel.ToolWindowViewModel viewModel)
            : base(null)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (viewModel == null)
            {
                throw new ArgumentNullException(nameof(viewModel));
            }

            base.Package = package;
            this.Caption = "Command Line Arguments";

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            this.view    = new View.ToolWindowControl(viewModel);
            this.Content = view;

            // Id from VSPackage.resx.
            BitmapResourceID = 300;

            // The index is actually zero-based, in contrast to the bitmaps in the vsct-file.
            BitmapIndex = 0;

            this.ToolBar = new CommandID(PackageGuids.guidCmdArgsToolBarCmdSet, PackageIds.TWToolbar);

            matchCaseSearchOption = new WindowSearchBooleanOption("Match Case", "Enable to make search case sensitive.", false);
            searchOptions         = new List <IVsWindowSearchOption> {
                matchCaseSearchOption
            };
        }
コード例 #2
0
        public ToolWindow(ViewModel.ToolWindowViewModel viewModel)
            : base(null)
        {
            if (viewModel == null)
                throw new ArgumentNullException(nameof(viewModel));

            this.Caption = "Commandline Arguments";

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            this.view = new View.ToolWindowControl(viewModel);
            this.Content = view;

            this.ToolBar = new CommandID(Commands.CmdArgsToolBarCmdSet, Commands.TWToolbar);
        }
コード例 #3
0
        public ToolWindow(ViewModel.ToolWindowViewModel viewModel)
            : base(null)
        {
            if (viewModel == null)
            {
                throw new ArgumentNullException(nameof(viewModel));
            }

            this.Caption = "Commandline Arguments";

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            this.view    = new View.ToolWindowControl(viewModel);
            this.Content = view;

            this.ToolBar = new CommandID(Commands.CmdArgsToolBarCmdSet, Commands.TWToolbar);
        }
コード例 #4
0
        public ToolWindow(ViewModel.ToolWindowViewModel viewModel)
            : base(null)
        {
            if (viewModel == null)
            {
                throw new ArgumentNullException(nameof(viewModel));
            }

            this.Caption = "Commandline Arguments";

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            this.view    = new View.ToolWindowControl(viewModel);
            this.Content = view;

            this.ToolBar = new CommandID(Commands.CmdArgsToolBarCmdSet, Commands.TWToolbar);

            matchCaseSearchOption = new WindowSearchBooleanOption("Match Case", "Enable to make search case sensitive.", false);
            searchOptions         = new List <IVsWindowSearchOption> {
                matchCaseSearchOption
            };
        }