Exemple #1
0
        public HistoryModel(SchemeHistory schemesHistory, OptionsStore optionsStore,
                            StudioStylesService studioStylesService, SettingsActivator settingsActivator)
        {
            SchemesHistory      = schemesHistory;
            OptionsStore        = optionsStore;
            StudioStylesService = studioStylesService;
            SettingsActivator   = settingsActivator;

            var stylesPerPage = optionsStore.StylesPerPage;

            PagedHistoryView = new PagedCollectionView(SchemesHistory.History)
            {
                PageSize = stylesPerPage
            };
            PagedHistoryView.SortDescriptions.Add(new SortDescription("Activations", ListSortDirection.Descending));

            CurrentSearchString = "";
            SearchValues        = new List <string>();
        }
Exemple #2
0
        protected override void Initialize()
        {
            base.Initialize();

            CreateNLogInstance();

            var mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (mcs == null)
            {
                return;
            }

            // The Solution Explorer tool bar entry.
            var solutionExplorerCommandId = new CommandID(Guids.SolutionRenamerVsPackageCmdSet, (int)CommandIds.SolutionExplorerCommandId);
            var solutionExplorerMenu      = new OleMenuCommand(OnRenameProject, solutionExplorerCommandId);

            solutionExplorerMenu.BeforeQueryStatus += RenameMenuEntriesOnBeforeQueryStatus;
            mcs.AddCommand(solutionExplorerMenu);

            // The context menu entry.
            var contextMenuCommandId = new CommandID(Guids.SolutionRenamerVsPackageCmdSet, (int)CommandIds.ContextMenuCommandId);
            var contextMenu          = new OleMenuCommand(OnRenameProject, contextMenuCommandId);

            contextMenu.BeforeQueryStatus += RenameMenuEntriesOnBeforeQueryStatus;
            mcs.AddCommand(contextMenu);

            // The overall options store for this package.
            OptionsStore = GetDialogPage(typeof(OptionsStore)) as OptionsStore;

            // Data we need all the time during the rename process.
            RenameData = new RenameData();

            GetGlobalServices();

            UpdateStatusBar("SimpleRenamer extension successfully initialized...");
        }
Exemple #3
0
 public Option([NotNull] OptionsStore store, [CanBeNull] string ns, [NotNull] string name)
     : base(store, ns, name)
 {
 }