public QuickMethodToolWindowControl(QuickMethodToolWindow oParent, bool searchInSolution, SymbolData.ESymbolType supportedSymbolTypes) { this.InitializeComponent(); mQuickMethodToolWindow = oParent; mSearchInSolution = searchInSolution; mSupportedSymbolTypes = supportedSymbolTypes; mDeferredRefresh = DeferredAction.Create(RefreshResults); mDeferredRefresh.Defer(0); DataContext = this; textBox.Focus(); // An aggregate catalog that combines multiple catalogs /* var catalog = new AggregateCatalog(); // Adds all the parts found in the necessary assemblies catalog.Catalogs.Add(new AssemblyCatalog(typeof(IGlyphService).Assembly)); catalog.Catalogs.Add(new AssemblyCatalog(typeof(SmartTagSurface).Assembly)); // Create the CompositionContainer with the parts in the catalog CompositionContainer mefContainer = new CompositionContainer(catalog); // Fill the imports of this object mefContainer.ComposeParts(this); [Import] public IGlyphService GlyphService { get; set; } */ }
/// <summary> /// Initializes a new instance of the <see cref="QuickSymbolCommand"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> private QuickSymbolCommand(Package package) { if (package == null) { throw new ArgumentNullException("package"); } this.package = package; OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { var menuCommandID = new CommandID(CommandSet, CommandId); var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID); commandService.AddCommand(menuItem); } window = new QuickMethodToolWindow(true, Data.SymbolData.ESymbolType.Namespace | Data.SymbolData.ESymbolType.Struct | Data.SymbolData.ESymbolType.Class | Data.SymbolData.ESymbolType.Interface | Data.SymbolData.ESymbolType.Macro | Data.SymbolData.ESymbolType.Enumerator | Data.SymbolData.ESymbolType.Enumeration | Data.SymbolData.ESymbolType.Method | Data.SymbolData.ESymbolType.MethodPrototype | Data.SymbolData.ESymbolType.Field | Data.SymbolData.ESymbolType.Property); }
public QuickMethodToolWindowControl(QuickMethodToolWindow oParent, bool searchInSolution, SymbolData.ESymbolType supportedSymbolTypes) { this.InitializeComponent(); mQuickMethodToolWindow = oParent; mSearchInSolution = searchInSolution; mSupportedSymbolTypes = supportedSymbolTypes; mDeferredRefresh = DeferredAction.Create(RefreshResults); DataContext = this; textBox.Focus(); // An aggregate catalog that combines multiple catalogs /* * var catalog = new AggregateCatalog(); * * // Adds all the parts found in the necessary assemblies * catalog.Catalogs.Add(new AssemblyCatalog(typeof(IGlyphService).Assembly)); * catalog.Catalogs.Add(new AssemblyCatalog(typeof(SmartTagSurface).Assembly)); * * // Create the CompositionContainer with the parts in the catalog * CompositionContainer mefContainer = new CompositionContainer(catalog); * * // Fill the imports of this object * mefContainer.ComposeParts(this); * * [Import] * public IGlyphService GlyphService { get; set; } */ }
public QuickMethodToolWindowControl(QuickMethodToolWindow oParent) { this.InitializeComponent(); mQuickMethodToolWindow = oParent; //For test /*System.Threading.Tasks.Task.Run(() => { System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); CTagsGenerator.GeneratorFromSolution(); stopwatch.Stop(); System.Diagnostics.Debug.WriteLine("GeneratorFromSolution " + stopwatch.ElapsedMilliseconds); stopwatch.Restart(); CTagsGenerator.GeneratorFromSolution3(); stopwatch.Stop(); System.Diagnostics.Debug.WriteLine("GeneratorFromSolution3 " + stopwatch.ElapsedMilliseconds); });*/ DataContext = this; RefreshResults(); textBox.Focus(); // An aggregate catalog that combines multiple catalogs /* var catalog = new AggregateCatalog(); // Adds all the parts found in the necessary assemblies catalog.Catalogs.Add(new AssemblyCatalog(typeof(IGlyphService).Assembly)); catalog.Catalogs.Add(new AssemblyCatalog(typeof(SmartTagSurface).Assembly)); // Create the CompositionContainer with the parts in the catalog CompositionContainer mefContainer = new CompositionContainer(catalog); // Fill the imports of this object mefContainer.ComposeParts(this); [Import] public IGlyphService GlyphService { get; set; } */ }
/// <summary> /// Initializes a new instance of the <see cref="QuickMethodCommand"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> private QuickMethodCommand(Package package) { if (package == null) { throw new ArgumentNullException("package"); } this.package = package; OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { var menuCommandID = new CommandID(CommandSet, CommandId); var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID); commandService.AddCommand(menuItem); } window = new QuickMethodToolWindow(false, Data.SymbolData.ESymbolType.Method | Data.SymbolData.ESymbolType.MethodPrototype); }
/// <summary> /// Shows the tool window when the menu item is clicked. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event args.</param> private void ShowToolWindow(object sender, EventArgs e) { QuickMethodToolWindow window = new QuickMethodToolWindow(true, Data.SymbolData.ESymbolType.Namespace | Data.SymbolData.ESymbolType.Class | Data.SymbolData.ESymbolType.Interface | Data.SymbolData.ESymbolType.Macro | Data.SymbolData.ESymbolType.Enumerator | Data.SymbolData.ESymbolType.Enumeration | Data.SymbolData.ESymbolType.Method | Data.SymbolData.ESymbolType.MethodPrototype | Data.SymbolData.ESymbolType.Field | Data.SymbolData.ESymbolType.Property); window.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; window.ShowModal(); }
/// <summary> /// Shows the tool window when the menu item is clicked. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event args.</param> private void ShowToolWindow(object sender, EventArgs e) { QuickMethodToolWindow window = new QuickMethodToolWindow(); window.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; window.ShowModal(); }
/// <summary> /// Shows the tool window when the menu item is clicked. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event args.</param> private void ShowToolWindow(object sender, EventArgs e) { QuickMethodToolWindow window = new QuickMethodToolWindow(false, Data.SymbolData.ESymbolType.Method | Data.SymbolData.ESymbolType.MethodPrototype); window.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; window.ShowModal(); }