/// <summary> /// Initializes a new instance of the <see cref="SpadeToolWindow" /> class. /// </summary> public SpadeToolWindow() : base(null) { // Set the tool window caption. Caption = "CodeMaid Spade"; // Set the tool window image from resources. BitmapResourceID = 508; BitmapIndex = 0; // Create the toolbar for the tool window. ToolBar = new CommandID(GuidList.GuidCodeMaidToolbarSpadeBaseGroup, PkgCmdIDList.ToolbarIDCodeMaidToolbarSpade); // Setup the associated classes. _viewModel = new SpadeViewModel { SortOrder = (CodeSortOrder)Settings.Default.Digging_PrimarySortOrder }; // Register for view model requests to be refreshed. _viewModel.RequestingRefresh += (sender, args) => Refresh(); // Create and set the view. base.Content = new SpadeView { DataContext = _viewModel }; // Register for changes to settings. Settings.Default.SettingsSaving += (sender, args) => OnSettingsSave(); }
/// <summary> /// Initializes a new instance of the <see cref="SpadeToolWindow" /> class. /// </summary> public SpadeToolWindow() : base(null) { // Set the tool window caption. Caption = Resources.CodeMaidSpade; // Set the tool window image from resources. BitmapResourceID = 508; BitmapIndex = 0; // Create the toolbar for the tool window. ToolBar = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.ToolbarIDCodeMaidToolbarSpade); // Setup the associated classes. _viewModel = new SpadeViewModel { SortOrder = (CodeSortOrder)Settings.Default.Digging_PrimarySortOrder }; // Register for view model requests to be refreshed. _viewModel.RequestingRefresh += (sender, args) => Refresh(); // Create and set the view. Content = new SpadeView { DataContext = _viewModel }; }
/// <summary> /// Initializes a new instance of the <see cref="SpadeToolWindow" /> class. /// </summary> public SpadeToolWindow() : base(null) { // Set the tool window caption. Caption = "CodeMaid Spade"; // Set the tool window image from resources. BitmapResourceID = 508; BitmapIndex = 0; // Create the toolbar for the tool window. ToolBar = new CommandID(GuidList.GuidCodeMaidToolbarSpadeBaseGroup, PkgCmdIDList.ToolbarIDCodeMaidToolbarSpade); // Setup the associated classes. _viewModel = new SpadeViewModel(); // Register for view model requests to be refreshed. _viewModel.RequestingRefresh += (sender, args) => Refresh(); // Create and set the view. base.Content = new SpadeView { DataContext = _viewModel }; // Register for changes to settings. Settings.Default.SettingsSaving += (sender, args) => Refresh(); }
/// <summary> /// Initializes a new instance of the <see cref="SpadeToolWindow" /> class. /// </summary> public SpadeToolWindow() : base(null) { // Set the tool window caption. Caption = "CodeMaid Spade"; // Set the tool window image from resources. BitmapResourceID = 508; BitmapIndex = 0; // Create the toolbar for the tool window. ToolBar = new CommandID(PackageGuids.GuidCodeMaidToolbarSpadeBaseGroup, PackageIds.ToolbarIDCodeMaidToolbarSpade); // Setup the associated classes. _viewModel = new SpadeViewModel { SortOrder = (CodeSortOrder)Settings.Default.Digging_PrimarySortOrder }; // Register for view model requests to be refreshed. _viewModel.RequestingRefresh += (sender, args) => Refresh(); // Create and set the view. Content = new SpadeView { DataContext = _viewModel }; // Register for changes to settings. Settings.Default.SettingsLoaded += (sender, args) => OnSettingsChange(); Settings.Default.SettingsSaving += (sender, args) => OnSettingsChange(); }