コード例 #1
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.videoCode = new OpenLiveWriter.Controls.TextBoxWithPaste();
            this.previewButton = new System.Windows.Forms.Button();
            this.previewBox = new System.Windows.Forms.WebBrowser();
            this.pictureBorder = new OpenLiveWriter.ApplicationFramework.BorderControl();
            this.lblSize = new System.Windows.Forms.Label();
            this.lblService = new System.Windows.Forms.Label();
            this.lblVideoCode = new System.Windows.Forms.Label();
            this.SuspendLayout();
            //
            // videoCode
            //
            this.videoCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.videoCode.Location = new System.Drawing.Point(8, 26);
            this.videoCode.Name = "videoCode";
            this.videoCode.Size = new System.Drawing.Size(185, 20);
            this.videoCode.TabIndex = 15;
            this.videoCode.DoubleClick += new System.EventHandler(this.VideoCode_Enter);
            this.videoCode.TextChanged += new System.EventHandler(this.videoCode_TextChanged);
            this.videoCode.Enter += new System.EventHandler(this.VideoCode_Enter);
            //
            // previewButton
            //
            this.previewButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.previewButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.previewButton.Location = new System.Drawing.Point(197, 26);
            this.previewButton.Name = "previewButton";
            this.previewButton.Size = new System.Drawing.Size(75, 23);
            this.previewButton.TabIndex = 16;
            this.previewButton.Text = "&Preview";
            this.previewButton.Click += new System.EventHandler(this._previewButton_Click);
            //
            // previewBox
            //
            this.previewBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.previewBox.Location = new System.Drawing.Point(0, 0);
            this.previewBox.Name = "previewBox";
            this.previewBox.Size = new System.Drawing.Size(259, 204);
            this.previewBox.TabIndex = 0;
            this.previewBox.TabStop = false;
            //
            // pictureBorder
            //
            this.pictureBorder.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.pictureBorder.AutoHeight = false;
            this.pictureBorder.BottomInset = 0;
            this.pictureBorder.Control = this.previewBox;
            this.pictureBorder.LeftInset = 0;
            this.pictureBorder.Location = new System.Drawing.Point(8, 50);
            this.pictureBorder.Name = "pictureBorder";
            this.pictureBorder.RightInset = 0;
            this.pictureBorder.Size = new System.Drawing.Size(263, 208);
            this.pictureBorder.SuppressBottomBorder = false;
            this.pictureBorder.TabIndex = 18;
            this.pictureBorder.TabStop = false;
            this.pictureBorder.ThemeBorder = false;
            this.pictureBorder.TopInset = 0;
            //
            // lblSize
            //
            this.lblSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lblSize.AutoSize = true;
            this.lblSize.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.lblSize.Location = new System.Drawing.Point(8, 262);
            this.lblSize.Name = "lblSize";
            this.lblSize.Size = new System.Drawing.Size(30, 13);
            this.lblSize.TabIndex = 2;
            this.lblSize.Text = "Size:";
            //
            // lblService
            //
            this.lblService.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lblService.AutoSize = true;
            this.lblService.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.lblService.Location = new System.Drawing.Point(112, 262);
            this.lblService.Name = "lblService";
            this.lblService.Size = new System.Drawing.Size(46, 13);
            this.lblService.TabIndex = 1;
            this.lblService.Text = "Service:";
            //
            // lblVideoCode
            //
            this.lblVideoCode.Location = new System.Drawing.Point(8, 8);
            this.lblVideoCode.Name = "lblVideoCode";
            this.lblVideoCode.Size = new System.Drawing.Size(349, 15);
            this.lblVideoCode.TabIndex = 0;
            this.lblVideoCode.Text = "&Video URL or Embed:";
            //
            // WebVideoSource
            //
            this.Controls.Add(this.lblVideoCode);
            this.Controls.Add(this.lblService);
            this.Controls.Add(this.lblSize);
            this.Controls.Add(this.videoCode);
            this.Controls.Add(this.previewButton);
            this.Controls.Add(this.pictureBorder);
            this.Name = "WebVideoSource";
            this.Size = new System.Drawing.Size(279, 279);
            this.ResumeLayout(false);
            this.PerformLayout();

        }
コード例 #2
0
 private void _imageUrl_Paste(object sender, TextBoxWithPaste.PasteEventArgs eventArgs)
 {
     //special case...image on clipboard
     if (_webImageUrl.Text.Trim() == String.Empty)
     {
         DataObjectMeister dataObject = new DataObjectMeister(Clipboard.GetDataObject());
         if (dataObject.HTMLData != null && dataObject.HTMLData.OnlyImagePath != null)
         {
             _webImageUrl.Text = dataObject.HTMLData.OnlyImagePath;
         }
     }
     PopulatePreviewBox();
     _webImageUrl.SelectAll();
 }