コード例 #1
0
        public static void CreateDebugMenu(ICommandBar menuBar, IServices services)
        {
            if (!DebugCommands.IsDebugMenuEnabled())
            {
                return;
            }
            ICommandBarMenu commandBarMenu1 = menuBar.Items.AddMenu("Debug", "Debug");

            commandBarMenu1.Items.AddButton("Debug_FocusTracker", "Focus Tracker");
            commandBarMenu1.Items.AddButton("Debug_DisplayTimingInformation", "Display Timing");
            commandBarMenu1.Items.AddButton("Debug_GarbageCollect", "Force GC");
            commandBarMenu1.Items.AddButton("Debug_UndoManager_Dump", "Dump UndoService");
            commandBarMenu1.Items.AddButton("Debug_UndoManager_Clear", "Clear UndoService");
            ICommandBarMenu commandBarMenu2 = commandBarMenu1.Items.AddMenu("Scene", "Scene");

            commandBarMenu2.Items.AddButton("Debug_CreateDocumentNodeView", "Create DocumentNode View");
            commandBarMenu2.Items.AddButton("Debug_DumpInstanceDictionary", "Dump InstanceDictionary");
            commandBarMenu2.Items.AddButton("Debug_DumpViewNodeTree", "Dump View Node Tree");
            commandBarMenu1.Items.AddMenu("Tree", "Tree");
            if (!(services.GetService <ISourceControlService>() is SourceControlService))
            {
                return;
            }
            commandBarMenu1.Items.AddMenu("TFS", "TFS");
        }
コード例 #2
0
 public DebugCommands(IServices services)
 {
     services.GetService <IExpressionInformationService>();
     if (!DebugCommands.IsDebugMenuEnabled())
     {
         return;
     }
     this.AddCommand("Debug_GarbageCollect", (ICommand) new DebugCommands.GarbageCollectCommand());
     this.AddCommand("Debug_DumpInstanceDictionary", (ICommand) new DebugCommands.DumpInstanceDictionaryCommand(services));
     this.AddCommand("Debug_DumpViewNodeTree", (ICommand) new DebugCommands.DumpActiveViewTreeCommand(services));
     this.AddCommand("Debug_DisplayTimingInformation", (ICommand) new DebugCommands.DisplayTimingInformationCommand());
 }