예제 #1
0
파일: GroupView.cs 프로젝트: ikvm/webmatrix
 public GroupView(GroupViewListView itemContainer)
 {
     this._sectionHeight = -1;
     if (itemContainer == null)
     {
         throw new ArgumentNullException();
     }
     base.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.Opaque | ControlStyles.UserPaint, true);
     this._sectionCollection = new GroupViewSectionCollection(this);
     this._selectedSectionIndex = -1;
     this._hoverIndex = -1;
     this._mouseDownIndex = -1;
     this._itemContainer = itemContainer;
     this._itemContainer.SelectedIndexChanged += new EventHandler(this.OnGroupViewItemSelectionChanged);
     this._itemContainer.Click += new EventHandler(this.OnGroupViewClicked);
     base.Controls.Add(this._itemContainer);
     this._toolTip = new RegionToolTip(this);
 }
예제 #2
0
 private void InitializeComponent()
 {
     this._groupListHolder = new Panel();
     this._groupList = new GroupViewListView();
     this._propGrid = new PropertyGrid();
     this._previewHolder = new Panel();
     this._preview = new HtmlControl(base.ServiceProvider);
     this._okButton = new MxButton();
     this._cancelButton = new MxButton();
     this._previewLabel = new MxLabel();
     this._instructionLabel = new MxLabel();
     this._groupListHolder.SuspendLayout();
     base.SuspendLayout();
     this._groupListHolder.BackColor = SystemColors.ControlDark;
     this._groupListHolder.Controls.AddRange(new Control[] { this._groupList });
     this._groupListHolder.DockPadding.All = 1;
     this._groupListHolder.Location = new Point(8, 30);
     this._groupListHolder.Name = "_groupListHolder";
     this._groupListHolder.Size = new Size(0x70, 0xf8);
     this._groupListHolder.TabIndex = 1;
     this._groupList.BackColor = SystemColors.Window;
     this._groupList.Dock = DockStyle.Fill;
     this._groupList.Location = new Point(1, 1);
     this._groupList.FullRowSelect = true;
     this._groupList.Name = "_groupList";
     this._groupList.Size = new Size(110, 0xf6);
     this._groupList.TabIndex = 0;
     this._groupList.SelectedIndexChanged += new EventHandler(this.OnGroupListSelectedIndexChanged);
     this._propGrid.CommandsVisibleIfAvailable = false;
     this._propGrid.LargeButtons = false;
     this._propGrid.LineColor = SystemColors.Control;
     this._propGrid.Location = new Point(0x7c, 30);
     this._propGrid.Name = "_propGrid";
     this._propGrid.PropertySort = PropertySort.Categorized;
     this._propGrid.Size = new Size(0x164, 0xf8);
     this._propGrid.TabIndex = 2;
     this._propGrid.ToolbarVisible = false;
     this._propGrid.BackColor = SystemColors.Control;
     this._propGrid.ViewBackColor = SystemColors.Window;
     this._propGrid.ViewForeColor = SystemColors.WindowText;
     this._propGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(this.OnPropGridPropertyValueChanged);
     this._previewHolder.BackColor = SystemColors.ControlDark;
     this._previewHolder.Location = new Point(8, 310);
     this._previewHolder.Controls.AddRange(new Control[] { this._preview });
     this._previewHolder.DockPadding.All = 1;
     this._previewHolder.Name = "_previewHolder";
     this._previewHolder.Size = new Size(0x1d8, 0x40);
     this._previewHolder.TabIndex = 4;
     this._previewHolder.TabStop = false;
     this._preview.Location = new Point(1, 1);
     this._preview.Name = "_preview";
     this._preview.Size = new Size(470, 0x3e);
     this._preview.ScrollBarsEnabled = false;
     this._preview.TabIndex = 0;
     this._preview.TabStop = false;
     this._okButton.Location = new Point(0x144, 0x180);
     this._okButton.Name = "_okButton";
     this._okButton.TabIndex = 5;
     this._okButton.Text = "OK";
     this._okButton.Click += new EventHandler(this.OnOKButtonClicked);
     this._cancelButton.Location = new Point(0x194, 0x180);
     this._cancelButton.Name = "_cancelButton";
     this._cancelButton.TabIndex = 6;
     this._cancelButton.Text = "Cancel";
     this._previewLabel.Location = new Point(8, 0x124);
     this._previewLabel.Name = "_previewLabel";
     this._previewLabel.Size = new Size(100, 0x10);
     this._previewLabel.TabIndex = 3;
     this._previewLabel.Text = "Preview:";
     this._instructionLabel.Location = new Point(8, 12);
     this._instructionLabel.Name = "_instructionLabel";
     this._instructionLabel.Size = new Size(240, 0x10);
     this._instructionLabel.TabIndex = 0;
     this._instructionLabel.Text = "Edit CSS style attributes:";
     this.AutoScaleBaseSize = new Size(5, 13);
     base.CancelButton = this._cancelButton;
     base.ClientSize = new Size(490, 0x19d);
     base.Controls.AddRange(new Control[] { this._instructionLabel, this._previewLabel, this._cancelButton, this._okButton, this._previewHolder, this._groupListHolder, this._propGrid });
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     base.MaximizeBox = false;
     base.MinimizeBox = false;
     base.Name = "StyleBuilder";
     base.ShowInTaskbar = false;
     base.StartPosition = FormStartPosition.CenterParent;
     this.Text = "StyleBuilder";
     this._groupListHolder.ResumeLayout(false);
     base.ResumeLayout(false);
 }