예제 #1
0
 public static Element GetWrapper(Interop.IHTMLElement element, HtmlControl owner)
 {
     Type type;
     Element element2;
     string str = element.GetTagName().ToLower();
     if (!str.Equals("input"))
     {
         type = (Type) wrapperTable[str];
     }
     else
     {
         object[] pvars = new object[1];
         element.GetAttribute("type", 1, pvars);
         string str2 = pvars[0].ToString().ToLower();
         if (str2.Equals("button"))
         {
             type = (Type) wrapperTable["inputbutton"];
         }
         else
         {
             type = (Type) wrapperTable[str2];
         }
     }
     if (type != null)
     {
         element2 = (Element) type.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Interop.IHTMLElement) }, null).Invoke(new object[] { element });
     }
     else
     {
         element2 = new Element(element);
     }
     element2.Owner = owner;
     return element2;
 }
예제 #2
0
 public MshtmlSite(HtmlControl hostControl)
 {
     if ((hostControl == null) || !hostControl.IsHandleCreated)
     {
         throw new ArgumentException();
     }
     this.hostControl = hostControl;
     hostControl.Resize += new EventHandler(this.OnParentResize);
 }
예제 #3
0
 public DropTarget(HtmlControl owner, DataObjectConverter converter, Interop.IOleDropTarget originalDropTarget)
 {
     this._owner = owner;
     this._converter = converter;
     this._originalDropTarget = originalDropTarget;
 }
예제 #4
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);
 }