private void ExecuteRedo(object sender, EventArgs e) { DetailsTemplateUndoEngine detailsTemplateUndoEngine = base.GetService(typeof(UndoEngine)) as DetailsTemplateUndoEngine; if (detailsTemplateUndoEngine != null) { detailsTemplateUndoEngine.DoRedo(); } }
private void SetupServices() { IDesignerHost designerHost = base.GetService(typeof(IDesignerHost)) as IDesignerHost; designerHost.AddService(typeof(INameCreationService), new DetailsTemplatesNameCreationService()); this.detailsTemplatesMenuService = new DetailsTemplatesMenuService(this); this.detailsTemplatesMenuService.Enabled = false; designerHost.AddService(typeof(IMenuCommandService), this.detailsTemplatesMenuService); designerHost.AddService(typeof(IDesignerSerializationService), new DetailsTemplatesSerializationService(this)); designerHost.AddService(typeof(ComponentSerializationService), new CodeDomComponentSerializationService(this)); UndoEngine undoEngine = new DetailsTemplateUndoEngine(this); undoEngine.Enabled = false; designerHost.AddService(typeof(UndoEngine), undoEngine); Application.AddMessageFilter(this); }