📄 blistcontroltoolbar.cs
字号:
if (backgoundImage != null)
{
Imps.Client.Utils.DrawHelper.DrawImage(g, base.ClientRectangle, backgoundImage, 1);
}
else
{
num = 4;
}
Label_0060:
this._rectTextBox = Rectangle.FromLTRB(this._pbMagnifier.Left - num, this._pbMagnifier.Top - 1, this._pbClear.Right + 3, this._pbMagnifier.Bottom);
g.FillRectangle(Brushes.White, this._rectTextBox);
base.OnPaint(e);
}
private void pbMenu_Click(object sender, EventArgs e)
{
if (this._dropdown != null)
{
this._dropdown.Show(this, this._pbMenu.Left, this._pbMenu.Bottom);
}
}
private void ResetTip()
{
try
{
Rectangle rectangle = new Rectangle(this._pbClear.Left, this._pbClear.Top, this._pbClear.Width, this._pbClear.Height);
Rectangle rectangle2 = new Rectangle(this._pbMenu.Left, this._pbMenu.Top, this._pbMenu.Width, this._pbMenu.Height);
Rectangle rectangle3 = new Rectangle(this._pbMagnifier.Left, this._pbMagnifier.Top, this._pbMagnifier.Width, this._pbMagnifier.Height);
string caption = this.TipText;
if (rectangle.Contains(base.PointToClient(Control.MousePosition)))
{
if (!string.IsNullOrEmpty(this.TipTextClear) && this._pbClear.Visible)
{
caption = this.TipTextClear;
}
}
else if (rectangle2.Contains(base.PointToClient(Control.MousePosition)))
{
if (!string.IsNullOrEmpty(this._tipTextMenu) && this._pbMenu.Visible)
{
caption = this._tipTextMenu;
}
}
else if (rectangle3.Contains(base.PointToClient(Control.MousePosition)))
{
if (!string.IsNullOrEmpty(this._tipTextMagnifier) && this._pbMagnifier.Visible)
{
caption = this._tipTextMagnifier;
}
}
else
{
if (this._rectTextBox.Contains(base.PointToClient(Control.MousePosition)))
{
this._searchTip.SetToolTip(this.tbSearch, this.TipText);
return;
}
caption = "";
}
if (!string.IsNullOrEmpty(caption) && (this._searchTip.GetToolTip(this) != caption))
{
this._searchTip.SetToolTip(this, caption);
}
}
catch
{
}
}
public void SetDisplayModeTrackBarBackground(Image img)
{
this.ctlDisplayMode.BackgroundImage = img;
this.ctlDisplayMode.set_BackgroundImageLayout(0);
this.ctlDisplayMode.Size = img.Size;
}
private void tbSearch_MouseHover(object sender, EventArgs e)
{
}
private void tbSearch_MouseLeave(object sender, EventArgs e)
{
}
private void tbSearch_TextChanged(object sender, EventArgs e)
{
this._pbClear.Visible = this.tbSearch.Text.Length > 0;
if ((this._lastString.Length > 0) && (this.tbSearch.Text.Length == 0))
{
this.BListControlToolbar_MouseHover(null, null);
}
else if ((this._lastString.Length == 0) && (this.tbSearch.Text.Length > 0))
{
this.BListControlToolbar_MouseHover(null, null);
}
this._lastString = this.tbSearch.Text;
}
private void TryLoadStyle()
{
try
{
Assembly asm = Assembly.GetCallingAssembly();
Image img = ListControlToolbarStyle.Instance.ContactTrackerImage ?? ResourceHelper.GetResImage(asm, "Imps.Client.Pc.Resource.Tracker_Contact.png");
this.SetDisplayModeTrackBarBackground(img);
if (((ListControlToolbarStyle.Instance.ThumbInnerColor == Color.Transparent) || (ListControlToolbarStyle.Instance.ThumbOuterColor == Color.Transparent)) || (((ListControlToolbarStyle.Instance.ThumbPenColor == Color.Transparent) || (ListControlToolbarStyle.Instance.BarInnerColor == Color.Transparent)) || (ListControlToolbarStyle.Instance.BarOuterColor == Color.Transparent)))
{
this.DisplayModeTrackBar.ColorSchema = XTrackBar.ColorSchemas.Fetion;
}
else
{
this.DisplayModeTrackBar.ThumbOuterColor = ListControlToolbarStyle.Instance.ThumbOuterColor;
this.DisplayModeTrackBar.ThumbInnerColor = ListControlToolbarStyle.Instance.ThumbInnerColor;
this.DisplayModeTrackBar.BarOuterColor = ListControlToolbarStyle.Instance.BarOuterColor;
this.DisplayModeTrackBar.BarInnerColor = ListControlToolbarStyle.Instance.BarInnerColor;
this.DisplayModeTrackBar.ThumbPenColor = ListControlToolbarStyle.Instance.ThumbPenColor;
}
}
catch
{
}
}
public XTrackBar DisplayModeTrackBar
{
get
{
return this.ctlDisplayMode;
}
}
public ToolStripDropDown DropDownMenu
{
get
{
return this._dropdown;
}
set
{
this._dropdown = value;
this._pbMenu.Visible = this._dropdown != null;
this.AdjustChildControls();
}
}
public XTextBox SearchTextBox
{
get
{
return this.tbSearch;
}
}
public bool ShowDisplayModeBar
{
get
{
return this.ctlDisplayMode.Visible;
}
set
{
if (this.ctlDisplayMode.Visible != value)
{
this.ctlDisplayMode.Visible = value;
this.AdjustChildControls();
}
}
}
public bool SimpleMode
{
get
{
return this._simpleMode;
}
set
{
if (this._simpleMode != value)
{
this._simpleMode = value;
this.DropDownMenu = null;
this.ShowDisplayModeBar = false;
}
}
}
public string TipText
{
get
{
if (string.IsNullOrEmpty(this._tipText))
{
return StringTable.Contact.ContactSearchTip;
}
return this._tipText;
}
set
{
this._tipText = value;
}
}
public string TipTextClear
{
get
{
if (string.IsNullOrEmpty(this._tipTextClear))
{
return StringTable.Contact.ContactSearchClearTip;
}
return this._tipTextClear;
}
set
{
this._tipTextClear = value;
}
}
public string TipTextMagnifier
{
get
{
if (string.IsNullOrEmpty(this._tipTextMagnifier))
{
return StringTable.Contact.ContactSearchTip;
}
return this._tipTextMagnifier;
}
set
{
this._tipTextMagnifier = value;
}
}
public string TipTextMenu
{
get
{
if (string.IsNullOrEmpty(this._tipTextMenu))
{
return StringTable.Contact.ContactSearchTip;
}
return this._tipTextMenu;
}
set
{
this._tipTextMenu = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -