📄 xtipex.cs
字号:
{
this.SetReturn(font, ref x, ref y);
}
DrawHelper.DrawImage(g, amigoImage.CurrentImage, new Rectangle(x, y, num5, 0x10));
x += num5;
width -= num5;
this._baseHeight = 0x13;
num += num5;
}
else if (obj2 is string)
{
string text = (string) obj2;
if ((((x + font.SizeInPoints) >= base.ClientRectangle.Right) || (((x + font.SizeInPoints) + 1f) >= base.ClientRectangle.Right)) || ((((x + font.SizeInPoints) + 2f) >= base.ClientRectangle.Right) || (((x + font.SizeInPoints) + 3f) >= base.ClientRectangle.Right)))
{
this.SetReturn(font, ref x, ref y);
}
System.Drawing.Point point = this.DrawString(g, text, font, x - 5, y, base.ClientSize.Width - x, sf);
x = point.X;
y = point.Y;
}
}
}
finally
{
enumerator.Dispose();
}
return new Size(x, y);
}
SizeF ef = g.MeasureString(sText, font, base.Width, sf);
num = (int) ef.Width;
g.DrawString(sText, font, SystemBrushes.WindowText, base.ClientRectangle, sf);
return ef.ToSize();
}
}
protected override void OnPaint(PaintEventArgs e)
{
this.DrawIconImage(e.Graphics, e.ClipRectangle);
}
protected virtual void ResizeEdit()
{
int num = 2;
if (this._currentLines >= this._maxLines)
{
this.richTextBox1.Height = (this._maxLines * this._baseHeight) + num;
this.richTextBox1.ScrollBars = RichTextBoxScrollBars.Both;
}
else
{
this.richTextBox1.Height = (this._currentLines * this._baseHeight) + num;
this.richTextBox1.ScrollBars = RichTextBoxScrollBars.Both;
}
this.richTextBox1.Left = ((this._tipImagePoint.X + 0x10) + base.get_Padding().get_Left()) + 1;
this.richTextBox1.Width = ((base.Width - this.richTextBox1.Left) + (((int) this._textFont.SizeInPoints) / 2)) - 4;
this.richTextBox1.SelectionStart = 0;
this.ResizeHeight();
this._tipEditShowMgr.RefreshLink();
}
protected virtual void ResizeHeight()
{
if (base.Height != this.richTextBox1.Height)
{
this._oriLines = this._currentLines;
}
base.Height = this.richTextBox1.Height;
}
private void SetReturn(Font font, ref int x, ref int y)
{
x = ((base.ClientRectangle.X + base.get_Padding().get_Left()) + 0x10) + 1;
y += font.Height;
this._currentLines++;
}
private void ShowEdit()
{
this._showIcon = true;
this.richTextBox1.Visible = true;
}
private void UserControl1_SizeChanged(object sender, EventArgs e)
{
if (this.Visible)
{
Graphics g = base.CreateGraphics();
this.MeasureText(g, this._textFont, this._text);
g.Dispose();
this.ResizeEdit();
base.Invalidate();
}
}
[DefaultValue(0)]
public Imps.Client.Pc.BizControls.ConversationTipType ConversationTipType
{
get
{
return this._conversationTipType;
}
set
{
this._conversationTipType = value;
switch (this._conversationTipType)
{
case Imps.Client.Pc.BizControls.ConversationTipType.Information:
this._tipImage = ImpsIcons.InfoIcon;
return;
case Imps.Client.Pc.BizControls.ConversationTipType.Warning:
return;
case Imps.Client.Pc.BizControls.ConversationTipType.Error:
this._tipImage = ImpsIcons.ErrorImage;
return;
}
throw new Exception("Invalid Parameter Value");
}
}
public override Color ForeColor
{
get
{
return this._foreColor;
}
set
{
this._foreColor = value;
this._tipEditShowMgr.ForeColor = value;
}
}
public string HTML
{
get
{
return this._html;
}
set
{
this._html = value;
Imps.Utils.TagParser.TagParser parser = Imps.Utils.TagParser.TagParser.Create(this._html, true);
this.Text = parser.Text;
this._tipEditShowMgr.HTML = this._html;
}
}
[DefaultValue(2)]
public int MaxLines
{
get
{
return this._maxLines;
}
set
{
this._maxLines = value;
}
}
public override string Text
{
get
{
return this._text;
}
set
{
this._text = value;
Graphics g = base.CreateGraphics();
this.MeasureText(g, this._textFont, this._text);
this.ResizeEdit();
this._tipEditShowMgr.HTML = this._text;
this._tipEditShowMgr.SelectionStart = 0;
g.Dispose();
}
}
public Font TextFont
{
get
{
return this._textFont;
}
set
{
this._textFont = value;
this._tipEditShowMgr.SelectionFont = this._textFont;
this._tipEditShowMgr.LinkButtonFont = this._textFont;
}
}
[Browsable(false)]
public Image TipImage
{
get
{
return this._tipImage;
}
set
{
this._tipImage = value;
}
}
public bool UseSymbol
{
get
{
return this._convertSymbol;
}
set
{
this._convertSymbol = value;
}
}
[Browsable(false)]
public bool Visible
{
get
{
return base.Visible;
}
set
{
base.Visible = value;
if (value)
{
this.ShowEdit();
}
else
{
this.HideEdit();
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -