|
I have bought the Multimedia SDK and Medical Suit. I have also unlock these two suit using the given serials from LeadTools Sales.
I further found that the "Object.Remove" is not work for some annotation objects only. (annAutomationObj.Id == AnnAutomationManager.StampObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.HotspotObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.RulerObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.ProtractorObjectId) || //not work
AnnAutomationManager automationManager;
RasterCodecs codecs = null; AnnAutomationObject annAutomationObj;
automationManager = new AnnAutomationManager(); RasterCodecs.Startup(); codecs = new RasterCodecs(); automationManager.RasterCodecs = codecs; automationManager.RedactionRealizePassword = String.Empty; automationManager.UseXPStyleToolBar = true; // enable 14.5 new XP style toolbar -- must be called CreateDefaultObjects(); automationManager.CreateDefaultObjects();
for (int idx = 0; idx < automationManager.Objects.Count; idx++) { annAutomationObj = automationManager.Objects[idx]; if ((annAutomationObj.Id == AnnAutomationManager.TextRollupObjectId) || (annAutomationObj.Id == AnnAutomationManager.NoteObjectId) || (annAutomationObj.Id == AnnAutomationManager.StampObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.RubberStampObjectId) || (annAutomationObj.Id == AnnAutomationManager.HotspotObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.FreehandHotspotObjectId) || (annAutomationObj.Id == AnnAutomationManager.ButtonObjectId) || (annAutomationObj.Id == AnnAutomationManager.PointObjectId) || (annAutomationObj.Id == AnnAutomationManager.RulerObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.PolyRulerObjectId) || (annAutomationObj.Id == AnnAutomationManager.ProtractorObjectId) || //not work (annAutomationObj.Id == AnnAutomationManager.CrossProductObjectId) || (annAutomationObj.Id == AnnAutomationManager.EncryptObjectId) || (annAutomationObj.Id == AnnAutomationManager.AudioObjectId) ) {
automationManager.Objects.Remove(annAutomationObj);
} }
automationManager.CreateToolBar(); automationManager.ToolBar.Dock = DockStyle.Right; automationManager.ToolBar.BringToFront(); automationManager.ToolBar.AutoSize = true; Controls.Add(automationManager.ToolBar);
BTW, Can I create the toolbar first and then add the defaulted toolbar button one by one because I don't want to remove many buttons from the default toolbar , which may introduce some overheard on performance. In addition, I can customize the ordering of the annotation toolbar button.
|