Exemplo n.º 1
0
        /// <summary>
        /// Creates an instance of this class
        /// </summary>
        protected VsxToolWindowPane() : base(null)
        {
            // --- Set package and content information
            ServiceProvider = Package = VsxPackage.GetPackage <TPackage>();
            base.Content    = Content = new TControl();

            // --- Obtain caption info
            var typeInfo    = GetType().GetTypeInfo();
            var captionAttr = typeInfo.GetCustomAttribute <CaptionAttribute>();

            if (captionAttr != null)
            {
                Caption = BaseCaption = captionAttr.Value;
            }

            // --- Obtain toolbar info
            var toolBarAttr = typeInfo.GetCustomAttribute <ToolWindowToolbarAttribute>();

            if (toolBarAttr != null)
            {
                VsxPackage.CommandSets.TryGetValue(toolBarAttr.CommandSet, out IVsxCommandSet commandSet);
                if (commandSet != null)
                {
                    ToolBar         = new CommandID(commandSet.Guid, toolBarAttr.CommandId);
                    ToolBarLocation = (int)toolBarAttr.Location;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sites the object in the specified package
        /// </summary>
        /// <param name="package"></param>
        public void Site(VsxPackage package)
        {
            Package = (TPackage)package;
            var guid = GetType().GetTypeInfo().GetCustomAttribute <GuidAttribute>();

            if (guid == null)
            {
                return;
            }

            GuidString = guid.Value;
            Guid       = new Guid(guid.Value);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object" /> class.
 /// </summary>
 protected EditorPaneBase()
 {
     Package   = VsxPackage.GetPackage <TPackage>();
     VsUiShell = (IVsUIShell)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShell));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Explicitly defined default constructor. Initialize new instance of the
 /// EditorFactory object.
 /// </summary>
 protected EditorFactoryBase()
 {
     Package = VsxPackage.GetPackage <TPackage>();
 }
Exemplo n.º 5
0
 public TaskListWindow()
 {
     _taskProvider = new TaskProvider(VsxPackage.GetPackage <SpectNetPackage>());
 }
Exemplo n.º 6
0
 public ErrorListWindow()
 {
     _errorListProvider = new ErrorListProvider(VsxPackage.GetPackage <SpectNetPackage>());
 }