public dlgSuperToolTipEditor(SuperToolTipInfoWrapper sttiw)
            : this()
        {
            this.superToolTip1.SetSuperStuff(btnPreview, sttiw);
            this._sttinfo = sttiw;
            this.chkShowHeaderSeparator.Checked = this._sttinfo.SuperToolTipInfo.ShowHeaderSeparator;
            this.chkShowFooterSeparator.Checked = this._sttinfo.SuperToolTipInfo.ShowFooterSeparator;

            this.picBodyImage.Image = this._sttinfo.SuperToolTipInfo.BodyImage;
            this.txtBody.Text       = this._sttinfo.SuperToolTipInfo.BodyText;
            this.txtBody.ForeColor  = this._sttinfo.SuperToolTipInfo.BodyForeColor;
            this.txtBody.Font       = this._sttinfo.SuperToolTipInfo.BodyFont;

            this.picFooterImage.Image = this._sttinfo.SuperToolTipInfo.FooterImage;
            this.txtFooter.Text       = this._sttinfo.SuperToolTipInfo.FooterText;
            this.txtFooter.ForeColor  = this._sttinfo.SuperToolTipInfo.FooterForeColor;
            this.txtFooter.Font       = this._sttinfo.SuperToolTipInfo.FooterFont;
            this.chkFooter.Checked    = this._sttinfo.SuperToolTipInfo.ShowFooter;

            this.txtHeader.Text      = this._sttinfo.SuperToolTipInfo.HeaderText;
            this.txtHeader.ForeColor = this._sttinfo.SuperToolTipInfo.HeaderForeColor;
            this.txtHeader.Font      = this._sttinfo.SuperToolTipInfo.HeaderFont;
            this.chkHeader.Checked   = this._sttinfo.SuperToolTipInfo.ShowHeader;

            this.btnBegin.BackColor  = this._sttinfo.SuperToolTipInfo.BackgroundGradientBegin;
            this.btnMiddle.BackColor = this._sttinfo.SuperToolTipInfo.BackgroundGradientMiddle;
            this.btnEnd.BackColor    = this._sttinfo.SuperToolTipInfo.BackgroundGradientEnd;

            this.grpHeader.Enabled = this._sttinfo.SuperToolTipInfo.ShowHeader;
            this.grpFooter.Enabled = this._sttinfo.SuperToolTipInfo.ShowFooter;
        }
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			SuperToolTipInfoWrapper superToolTipInfoWrapper1 = new SuperToolTipInfoWrapper();
			SuperToolTipInfo superToolTipInfo1 = new SuperToolTipInfo();
			SuperToolTipInfoWrapper superToolTipInfoWrapper2 = new SuperToolTipInfoWrapper();
			this.richTextBox1 = new System.Windows.Forms.RichTextBox();
			this.superToolTip1 = new SuperToolTip(this.components);
			this.button1 = new System.Windows.Forms.Button();
			this.SuspendLayout();
			//
			// richTextBox1
			//
			this.richTextBox1.Location = new System.Drawing.Point(21, 12);
			this.richTextBox1.Name = "richTextBox1";
			this.richTextBox1.Size = new System.Drawing.Size(235, 167);
			superToolTipInfo1.BackgroundGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
			superToolTipInfo1.BackgroundGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(218)))), ((int)(((byte)(239)))));
			superToolTipInfo1.BackgroundGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(246)))), ((int)(((byte)(251)))));
			superToolTipInfo1.BodyFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			superToolTipInfo1.BodyText = "hello\r\nalsdkjfsaldjk\r\nasdlfjasl\r\n\r\nsalkdjflk\r\n";
			superToolTipInfo1.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
			superToolTipInfo1.HeaderText = "Test";
			superToolTipInfo1.OffsetForWhereToDisplay = new System.Drawing.Point(0, 0);
			superToolTipInfoWrapper1.SuperToolTipInfo = superToolTipInfo1;
			superToolTipInfoWrapper1.UseSuperToolTip = true;
			this.superToolTip1.SetSuperStuff(this.richTextBox1, superToolTipInfoWrapper1);
			this.richTextBox1.TabIndex = 0;
			this.richTextBox1.Text = "one\n\n\ntwo\n\n\nthree\n\n\nfour";
			this.richTextBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.richTextBox1_MouseMove);
			//
			// button1
			//
			this.button1.Location = new System.Drawing.Point(146, 198);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 23);
			superToolTipInfoWrapper2.SuperToolTipInfo = null;
			this.superToolTip1.SetSuperStuff(this.button1, superToolTipInfoWrapper2);
			this.button1.TabIndex = 1;
			this.button1.Text = "button1";
			this.button1.UseVisualStyleBackColor = true;
			this.button1.Click += new System.EventHandler(this.button1_Click);
			//
			// SuperToolTipTestForm
			//
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(292, 266);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.richTextBox1);
			this.Name = "SuperToolTipTestForm";
			this.Text = "SuperToolTipTestForm";
			this.ResumeLayout(false);

		}
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider == null)
            {
                return(null);
            }
            IWindowsFormsEditorService iwefs = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            SuperToolTipInfoWrapper    info  = (SuperToolTipInfoWrapper)value;
            dlgSuperToolTipEditor      dlg   = new dlgSuperToolTipEditor(info);

            if (iwefs.ShowDialog(dlg) == DialogResult.OK)
            {
                return(dlg.SuperToolTipInfoWrapper);
            }
            return(value);
        }
示例#4
0
        private void SetControlInfo(Control control, SuperToolTipInfoWrapper info)
        {
            if (controlTable.ContainsKey(control))
            {
                if (info == null)
                //hook events to our event handlers;
                {
                    control.MouseEnter -= new EventHandler(MouseEntered);
                    control.MouseLeave -= new EventHandler(MouseLeft);

                    controlTable.Remove(control);
                    return;
                }
                controlTable[control] = info;
            }
            else
            {
                controlTable.Add(control, info);
                //hook events to our event handlers;
                control.MouseEnter += new EventHandler(MouseEntered);
                control.MouseLeave += new EventHandler(MouseLeft);
            }
        }
示例#5
0
		public void SetSuperStuff(Control control, SuperToolTipInfoWrapper info)
		{
			SetControlInfo(control, info);
		}
示例#6
0
		private void SetControlInfo(Control control, SuperToolTipInfoWrapper info)
		{
			if (controlTable.ContainsKey(control))
			{
				if (info == null)
						//hook events to our event handlers;
				{
					control.MouseEnter -= new EventHandler(MouseEntered);
					control.MouseLeave -= new EventHandler(MouseLeft);

					controlTable.Remove(control);
					return;
				}
				controlTable[control] = info;
			}
			else
			{
				controlTable.Add(control, info);
				//hook events to our event handlers;
				control.MouseEnter += new EventHandler(MouseEntered);
				control.MouseLeave += new EventHandler(MouseLeft);
			}
		}
示例#7
0
 public void SetSuperStuff(Control control, SuperToolTipInfoWrapper info)
 {
     SetControlInfo(control, info);
 }
		public dlgSuperToolTipEditor(SuperToolTipInfoWrapper sttiw)
			: this()
		{
			this.superToolTip1.SetSuperStuff(btnPreview, sttiw);
			this._sttinfo = sttiw;
			this.chkShowHeaderSeparator.Checked = this._sttinfo.SuperToolTipInfo.ShowHeaderSeparator;
			this.chkShowFooterSeparator.Checked = this._sttinfo.SuperToolTipInfo.ShowFooterSeparator;

			this.picBodyImage.Image = this._sttinfo.SuperToolTipInfo.BodyImage;
			this.txtBody.Text = this._sttinfo.SuperToolTipInfo.BodyText;
			this.txtBody.ForeColor = this._sttinfo.SuperToolTipInfo.BodyForeColor;
			this.txtBody.Font = this._sttinfo.SuperToolTipInfo.BodyFont;

			this.picFooterImage.Image = this._sttinfo.SuperToolTipInfo.FooterImage;
			this.txtFooter.Text = this._sttinfo.SuperToolTipInfo.FooterText;
			this.txtFooter.ForeColor = this._sttinfo.SuperToolTipInfo.FooterForeColor;
			this.txtFooter.Font = this._sttinfo.SuperToolTipInfo.FooterFont;
			this.chkFooter.Checked = this._sttinfo.SuperToolTipInfo.ShowFooter;

			this.txtHeader.Text = this._sttinfo.SuperToolTipInfo.HeaderText;
			this.txtHeader.ForeColor = this._sttinfo.SuperToolTipInfo.HeaderForeColor;
			this.txtHeader.Font = this._sttinfo.SuperToolTipInfo.HeaderFont;
			this.chkHeader.Checked = this._sttinfo.SuperToolTipInfo.ShowHeader;

			this.btnBegin.BackColor = this._sttinfo.SuperToolTipInfo.BackgroundGradientBegin;
			this.btnMiddle.BackColor = this._sttinfo.SuperToolTipInfo.BackgroundGradientMiddle;
			this.btnEnd.BackColor = this._sttinfo.SuperToolTipInfo.BackgroundGradientEnd;

			this.grpHeader.Enabled = this._sttinfo.SuperToolTipInfo.ShowHeader;
			this.grpFooter.Enabled = this._sttinfo.SuperToolTipInfo.ShowFooter;
		}