示例#1
0
        void Initialize()
        {
            NSApplication.SharedApplication.SetAutomaticCustomizeTouchBarMenuItemEnabled(true);
            touchbar = new NSTouchBar();
            service  = ToolbarService.Current;
            context  = InspectorContext.Current;

            if (context.Manager == null)
            {
                var inspectorDelegate = new MacInspectorDelegate();
                inspectorDelegate.InitializeManager(context, service);
            }

            context.FocusedViewChanged += Context_FocusedViewChanged;
        }
示例#2
0
        public void InitializeManager(InspectorContext context, ToolbarService service)
        {
            LoadModules(context);

            var over     = new MacBorderedWindow(CGRect.Empty, NSColor.Green);
            var next     = new MacBorderedWindow(CGRect.Empty, NSColor.Red);
            var previous = new MacBorderedWindow(CGRect.Empty, NSColor.Blue);
            var acc      = new MacAccessibilityWindow(new CGRect(10, 10, 600, 700));
            var ins      = new InspectorWindow(this, new CGRect(10, 10, 600, 700));;
            var tool     = new MacToolbarWindow(this, new CGRect(10, 10, 100, 700));

            tool.ShowToolkit(false);
            var manager = new InspectorManager(this, over, next, previous, acc, ins, tool);

            context.Initialize(manager, false);
            service.SetDelegate(this);
        }