コード例 #1
0
        public void CreateContextMenu(ContextMenuControlProperties props, string id, string title, string description, string maxWidth)
        {
            ContextMenu menu = new ContextMenu(this, id, title, description, null);

            if (props == null)
            {
                props = new ContextMenuControlProperties();
            }

            props.CommandMenuOpen  = ContextMenuRootProperties.CommandMenuOpen;
            props.CommandMenuClose = ContextMenuRootProperties.CommandMenuClose;

            ContextMenuControl control = new ContextMenuControl(
                this,
                id + "Launcher",
                props,
                menu);

            _createdMenuControls[id] = control;

            ContextMenuDock dock = new ContextMenuDock(this, "dock" + id);

            dock.AddChild(control.CreateComponentForDisplayMode("Menu"));
            this.AddChild(dock);
            this.Refresh();
        }
コード例 #2
0
ファイル: contextmenuroot.cs プロジェクト: modulexcite/IL2JS
        public void CreateContextMenu(ContextMenuControlProperties props, string id, string title, string description, string maxWidth)
        {
            ContextMenu menu = new ContextMenu(this, id, title, description, null);

            if (props == null)
                props = new ContextMenuControlProperties();

            props.CommandMenuOpen = ContextMenuRootProperties.CommandMenuOpen;
            props.CommandMenuClose = ContextMenuRootProperties.CommandMenuClose;

            ContextMenuControl control = new ContextMenuControl(
                                                                this,
                                                                id + "Launcher",
                                                                props,
                                                                menu);

            _createdMenuControls[id] = control;

            ContextMenuDock dock = new ContextMenuDock(this, "dock" + id);
            dock.AddChild(control.CreateComponentForDisplayMode("Menu"));
            this.AddChild(dock);
            this.Refresh();
        }