public MenuBindingsEditorForm(IServiceProvider serviceProvider, System.Web.UI.WebControls.Menu menu, MenuDesigner menuDesigner) : base(serviceProvider)
 {
     this._menu = menu;
     this.InitializeComponent();
     this.InitializeUI();
     foreach (MenuItemBinding binding in this._menu.DataBindings)
     {
         MenuItemBinding clone = (MenuItemBinding) ((ICloneable) binding).Clone();
         menuDesigner.RegisterClone(binding, clone);
         this._bindingsListView.Items.Add(clone);
     }
 }
Beispiel #2
0
 public MenuDesignerActionList(MenuDesigner parent) : base(parent.Component)
 {
     this._parent = parent;
 }
Beispiel #3
0
        public MenuItemCollectionEditorDialog(System.Web.UI.WebControls.Menu menu, MenuDesigner menuDesigner) : base(menu.Site)
        {
            this._webMenu         = menu;
            this._menuDesigner    = menuDesigner;
            this._treeViewPanel   = new System.Windows.Forms.Panel();
            this._treeView        = new System.Windows.Forms.TreeView();
            this._treeViewToolBar = new ToolStrip();
            ToolStripRenderer toolStripRenderer = UIServiceHelper.GetToolStripRenderer(base.ServiceProvider);

            if (toolStripRenderer != null)
            {
                this._treeViewToolBar.Renderer = toolStripRenderer;
            }
            this._propertyGrid     = new VsPropertyGrid(base.ServiceProvider);
            this._okButton         = new System.Windows.Forms.Button();
            this._cancelButton     = new System.Windows.Forms.Button();
            this._propertiesLabel  = new System.Windows.Forms.Label();
            this._nodesLabel       = new System.Windows.Forms.Label();
            this._addRootButton    = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_AddRoot"), 3);
            this._addChildButton   = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_AddChild"), 2);
            this._removeButton     = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_Remove"), 4);
            this._moveUpButton     = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_MoveUp"), 5);
            this._moveDownButton   = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_MoveDown"), 6);
            this._indentButton     = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_Indent"), 1);
            this._unindentButton   = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_Unindent"), 0);
            this._toolBarSeparator = new ToolStripSeparator();
            this._treeViewPanel.SuspendLayout();
            base.SuspendLayout();
            this._treeViewPanel.Anchor    = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this._treeViewPanel.BackColor = SystemColors.ControlDark;
            this._treeViewPanel.Controls.Add(this._treeView);
            this._treeViewPanel.DockPadding.Left   = 1;
            this._treeViewPanel.DockPadding.Right  = 1;
            this._treeViewPanel.DockPadding.Bottom = 1;
            this._treeViewPanel.DockPadding.Top    = 1;
            this._treeViewPanel.Location           = new Point(12, 0x36);
            this._treeViewPanel.Name          = "_treeViewPanel";
            this._treeViewPanel.Size          = new Size(0xe3, 0xe9);
            this._treeViewPanel.TabIndex      = 1;
            this._treeView.BorderStyle        = System.Windows.Forms.BorderStyle.None;
            this._treeView.Dock               = DockStyle.Fill;
            this._treeView.ImageIndex         = -1;
            this._treeView.HideSelection      = false;
            this._treeView.Location           = new Point(1, 1);
            this._treeView.Name               = "_treeView";
            this._treeView.SelectedImageIndex = -1;
            this._treeView.TabIndex           = 0;
            this._treeView.AfterSelect       += new TreeViewEventHandler(this.OnTreeViewAfterSelect);
            this._treeView.KeyDown           += new KeyEventHandler(this.OnTreeViewKeyDown);
            this._treeViewToolBar.Items.AddRange(new ToolStripItem[] { this._addRootButton, this._addChildButton, this._removeButton, this._toolBarSeparator, this._moveUpButton, this._moveDownButton, this._unindentButton, this._indentButton });
            this._treeViewToolBar.Location    = new Point(12, 0x1c);
            this._treeViewToolBar.Anchor      = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this._treeViewToolBar.AutoSize    = false;
            this._treeViewToolBar.Size        = new Size(0xe3, 0x1a);
            this._treeViewToolBar.CanOverflow = false;
            Padding padding = this._treeViewToolBar.Padding;

            padding.Left = 2;
            this._treeViewToolBar.Padding          = padding;
            this._treeViewToolBar.Name             = "_treeViewToolBar";
            this._treeViewToolBar.ShowItemToolTips = true;
            this._treeViewToolBar.GripStyle        = ToolStripGripStyle.Hidden;
            this._treeViewToolBar.TabIndex         = 1;
            this._treeViewToolBar.TabStop          = true;
            this._treeViewToolBar.ItemClicked     += new ToolStripItemClickedEventHandler(this.OnTreeViewToolBarButtonClick);
            this._propertyGrid.Anchor = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
            this._propertyGrid.CommandsVisibleIfAvailable = true;
            this._propertyGrid.LargeButtons          = false;
            this._propertyGrid.LineColor             = SystemColors.ScrollBar;
            this._propertyGrid.Location              = new Point(260, 0x1c);
            this._propertyGrid.Name                  = "_propertyGrid";
            this._propertyGrid.PropertySort          = PropertySort.Alphabetical;
            this._propertyGrid.Size                  = new Size(0xcc, 0x103);
            this._propertyGrid.TabIndex              = 3;
            this._propertyGrid.Text                  = System.Design.SR.GetString("MenuItemCollectionEditor_PropertyGrid");
            this._propertyGrid.ToolbarVisible        = true;
            this._propertyGrid.ViewBackColor         = SystemColors.Window;
            this._propertyGrid.ViewForeColor         = SystemColors.WindowText;
            this._propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(this.OnPropertyGridPropertyValueChanged);
            this._propertyGrid.Site                  = this._webMenu.Site;
            this._okButton.Anchor          = AnchorStyles.Right | AnchorStyles.Bottom;
            this._okButton.FlatStyle       = FlatStyle.System;
            this._okButton.Location        = new Point(0x135, 0x128);
            this._okButton.Name            = "_okButton";
            this._okButton.Size            = new Size(0x4b, 0x17);
            this._okButton.TabIndex        = 9;
            this._okButton.Text            = System.Design.SR.GetString("MenuItemCollectionEditor_OK");
            this._okButton.Click          += new EventHandler(this.OnOkButtonClick);
            this._cancelButton.Anchor      = AnchorStyles.Right | AnchorStyles.Bottom;
            this._cancelButton.FlatStyle   = FlatStyle.System;
            this._cancelButton.Location    = new Point(0x185, 0x128);
            this._cancelButton.Name        = "_cancelButton";
            this._cancelButton.Size        = new Size(0x4b, 0x17);
            this._cancelButton.TabIndex    = 10;
            this._cancelButton.Text        = System.Design.SR.GetString("MenuItemCollectionEditor_Cancel");
            this._cancelButton.Click      += new EventHandler(this.OnCancelButtonClick);
            this._propertiesLabel.Anchor   = AnchorStyles.Right | AnchorStyles.Top;
            this._propertiesLabel.Location = new Point(260, 12);
            this._propertiesLabel.Name     = "_propertiesLabel";
            this._propertiesLabel.Size     = new Size(0xcc, 14);
            this._propertiesLabel.TabIndex = 2;
            this._propertiesLabel.Text     = System.Design.SR.GetString("MenuItemCollectionEditor_Properties");
            this._nodesLabel.Location      = new Point(12, 12);
            this._nodesLabel.Name          = "_nodesLabel";
            this._nodesLabel.Size          = new Size(100, 14);
            this._nodesLabel.TabIndex      = 0;
            this._nodesLabel.Text          = System.Design.SR.GetString("MenuItemCollectionEditor_Nodes");
            ImageList list = new ImageList {
                ImageSize        = new Size(0x10, 0x10),
                TransparentColor = Color.Magenta
            };

            list.Images.AddStrip(new Bitmap(base.GetType(), "Commands.bmp"));
            this._treeViewToolBar.ImageList = list;
            base.ClientSize   = new Size(0x1de, 0x14b);
            base.CancelButton = this._cancelButton;
            base.Controls.AddRange(new Control[] { this._nodesLabel, this._propertiesLabel, this._cancelButton, this._okButton, this._propertyGrid, this._treeViewPanel, this._treeViewToolBar });
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MinimumSize     = new Size(0x1e4, 0x14b);
            base.Name            = "TreeNodeEditor";
            base.SizeGripStyle   = SizeGripStyle.Hide;
            this.Text            = System.Design.SR.GetString("MenuItemCollectionEditor_Title");
            this._treeViewPanel.ResumeLayout(false);
            base.InitializeForm();
            base.ResumeLayout(false);
        }
 public MenuBindingsEditorForm(IServiceProvider serviceProvider, System.Web.UI.WebControls.Menu menu, MenuDesigner menuDesigner) : base(serviceProvider)
 {
     this._menu = menu;
     this.InitializeComponent();
     this.InitializeUI();
     foreach (MenuItemBinding binding in this._menu.DataBindings)
     {
         MenuItemBinding clone = (MenuItemBinding)((ICloneable)binding).Clone();
         menuDesigner.RegisterClone(binding, clone);
         this._bindingsListView.Items.Add(clone);
     }
 }
 public MenuDesignerActionList(MenuDesigner parent)
     : base(parent.Component)
 {
     this._parent = parent;
 }
 public MenuItemCollectionEditorDialog(System.Web.UI.WebControls.Menu menu, MenuDesigner menuDesigner)
     : base(menu.Site)
 {
     this._webMenu = menu;
     this._menuDesigner = menuDesigner;
     this._treeViewPanel = new System.Windows.Forms.Panel();
     this._treeView = new System.Windows.Forms.TreeView();
     this._treeViewToolBar = new ToolStrip();
     this._propertyGrid = new VsPropertyGrid(base.ServiceProvider);
     this._okButton = new System.Windows.Forms.Button();
     this._cancelButton = new System.Windows.Forms.Button();
     this._propertiesLabel = new System.Windows.Forms.Label();
     this._nodesLabel = new System.Windows.Forms.Label();
     this._addRootButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_AddRoot"), 3);
     this._addChildButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_AddChild"), 2);
     this._removeButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_Remove"), 4);
     this._moveUpButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_MoveUp"), 5);
     this._moveDownButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_MoveDown"), 6);
     this._indentButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_Indent"), 1);
     this._unindentButton = base.CreatePushButton(System.Design.SR.GetString("MenuItemCollectionEditor_Unindent"), 0);
     this._toolBarSeparator = new ToolStripSeparator();
     this._treeViewPanel.SuspendLayout();
     base.SuspendLayout();
     this._treeViewPanel.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this._treeViewPanel.BackColor = SystemColors.ControlDark;
     this._treeViewPanel.Controls.Add(this._treeView);
     this._treeViewPanel.DockPadding.Left = 1;
     this._treeViewPanel.DockPadding.Right = 1;
     this._treeViewPanel.DockPadding.Bottom = 1;
     this._treeViewPanel.DockPadding.Top = 1;
     this._treeViewPanel.Location = new Point(12, 0x36);
     this._treeViewPanel.Name = "_treeViewPanel";
     this._treeViewPanel.Size = new Size(0xe3, 0xe9);
     this._treeViewPanel.TabIndex = 1;
     this._treeView.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this._treeView.Dock = DockStyle.Fill;
     this._treeView.ImageIndex = -1;
     this._treeView.HideSelection = false;
     this._treeView.Location = new Point(1, 1);
     this._treeView.Name = "_treeView";
     this._treeView.SelectedImageIndex = -1;
     this._treeView.TabIndex = 0;
     this._treeView.AfterSelect += new TreeViewEventHandler(this.OnTreeViewAfterSelect);
     this._treeView.KeyDown += new KeyEventHandler(this.OnTreeViewKeyDown);
     this._treeViewToolBar.Items.AddRange(new ToolStripItem[] { this._addRootButton, this._addChildButton, this._removeButton, this._toolBarSeparator, this._moveUpButton, this._moveDownButton, this._unindentButton, this._indentButton });
     this._treeViewToolBar.Location = new Point(12, 0x1c);
     this._treeViewToolBar.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this._treeViewToolBar.AutoSize = false;
     this._treeViewToolBar.Size = new Size(0xe3, 0x1a);
     this._treeViewToolBar.CanOverflow = false;
     Padding padding = this._treeViewToolBar.Padding;
     padding.Left = 2;
     this._treeViewToolBar.Padding = padding;
     this._treeViewToolBar.Name = "_treeViewToolBar";
     this._treeViewToolBar.RenderMode = ToolStripRenderMode.System;
     this._treeViewToolBar.ShowItemToolTips = true;
     this._treeViewToolBar.GripStyle = ToolStripGripStyle.Hidden;
     this._treeViewToolBar.TabIndex = 1;
     this._treeViewToolBar.TabStop = true;
     this._treeViewToolBar.ItemClicked += new ToolStripItemClickedEventHandler(this.OnTreeViewToolBarButtonClick);
     this._propertyGrid.Anchor = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
     this._propertyGrid.CommandsVisibleIfAvailable = true;
     this._propertyGrid.LargeButtons = false;
     this._propertyGrid.LineColor = SystemColors.ScrollBar;
     this._propertyGrid.Location = new Point(260, 0x1c);
     this._propertyGrid.Name = "_propertyGrid";
     this._propertyGrid.PropertySort = PropertySort.Alphabetical;
     this._propertyGrid.Size = new Size(0xcc, 0x103);
     this._propertyGrid.TabIndex = 3;
     this._propertyGrid.Text = System.Design.SR.GetString("MenuItemCollectionEditor_PropertyGrid");
     this._propertyGrid.ToolbarVisible = true;
     this._propertyGrid.ViewBackColor = SystemColors.Window;
     this._propertyGrid.ViewForeColor = SystemColors.WindowText;
     this._propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(this.OnPropertyGridPropertyValueChanged);
     this._propertyGrid.Site = this._webMenu.Site;
     this._okButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this._okButton.FlatStyle = FlatStyle.System;
     this._okButton.Location = new Point(0x135, 0x128);
     this._okButton.Name = "_okButton";
     this._okButton.Size = new Size(0x4b, 0x17);
     this._okButton.TabIndex = 9;
     this._okButton.Text = System.Design.SR.GetString("MenuItemCollectionEditor_OK");
     this._okButton.Click += new EventHandler(this.OnOkButtonClick);
     this._cancelButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this._cancelButton.FlatStyle = FlatStyle.System;
     this._cancelButton.Location = new Point(0x185, 0x128);
     this._cancelButton.Name = "_cancelButton";
     this._cancelButton.Size = new Size(0x4b, 0x17);
     this._cancelButton.TabIndex = 10;
     this._cancelButton.Text = System.Design.SR.GetString("MenuItemCollectionEditor_Cancel");
     this._cancelButton.Click += new EventHandler(this.OnCancelButtonClick);
     this._propertiesLabel.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     this._propertiesLabel.Location = new Point(260, 12);
     this._propertiesLabel.Name = "_propertiesLabel";
     this._propertiesLabel.Size = new Size(0xcc, 14);
     this._propertiesLabel.TabIndex = 2;
     this._propertiesLabel.Text = System.Design.SR.GetString("MenuItemCollectionEditor_Properties");
     this._nodesLabel.Location = new Point(12, 12);
     this._nodesLabel.Name = "_nodesLabel";
     this._nodesLabel.Size = new Size(100, 14);
     this._nodesLabel.TabIndex = 0;
     this._nodesLabel.Text = System.Design.SR.GetString("MenuItemCollectionEditor_Nodes");
     ImageList list = new ImageList {
         ImageSize = new Size(0x10, 0x10),
         TransparentColor = Color.Magenta
     };
     list.Images.AddStrip(System.Drawing.BitmapSelector.CreateBitmap(base.GetType(), "Commands.bmp"));
     this._treeViewToolBar.ImageList = list;
     base.ClientSize = new Size(0x1de, 0x14b);
     base.CancelButton = this._cancelButton;
     base.Controls.AddRange(new Control[] { this._nodesLabel, this._propertiesLabel, this._cancelButton, this._okButton, this._propertyGrid, this._treeViewPanel, this._treeViewToolBar });
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     this.MinimumSize = new Size(0x1e4, 0x14b);
     base.Name = "TreeNodeEditor";
     base.SizeGripStyle = SizeGripStyle.Hide;
     this.Text = System.Design.SR.GetString("MenuItemCollectionEditor_Title");
     this._treeViewPanel.ResumeLayout(false);
     base.InitializeForm();
     base.ResumeLayout(false);
 }