📄 contactlistcontrol.cs
字号:
if (this._contactInfoChangedCol.get_Count() <= 0)
{
GlobalTimer.Unregister(new EventHandler(this.handleContactInfoChanged_Tick));
}
}
this.m_buddytree_widget.sort_allitems(true);
}
private void handleContactPresenceChanged_Tick(object sender, EventArgs e)
{
if (this.CurrentUser.Status == UserAccountStatus.Logon)
{
lock (this._contactPresenceChangedCol)
{
for (int i = this._contactPresenceChangedCol.get_Count() - 1; i >= 0; i--)
{
ContactChangedEventArgs args = this._contactPresenceChangedCol.get_Item(i);
Imps.Client.Core.Contact contact = args.Contact;
if (contact.Type == ContactType.Stranger)
{
this._contactPresenceChangedCol.RemoveAt(i);
continue;
}
if (this._currentTreeGroupByType == ContactTreeGroupByType.Group)
{
this.m_buddytree_widget.update_contact_info(contact, args.ContactEventType, false, false);
goto Label_0116;
}
if (this._currentTreeGroupByType == ContactTreeGroupByType.Presence)
{
using (IEnumerator<SystemFixedContactGroup> enumerator = this.GroupsByPresence.GetEnumerator())
{
while (enumerator.MoveNext())
{
enumerator.get_Current().UpdateBelong(contact);
}
goto Label_0103;
}
}
if (this._currentTreeGroupByType == ContactTreeGroupByType.Terminal)
{
using (IEnumerator<SystemFixedContactGroup> enumerator2 = this.GroupsByTerminal.GetEnumerator())
{
while (enumerator2.MoveNext())
{
enumerator2.get_Current().UpdateBelong(contact);
}
}
}
Label_0103:
this.contactNodes_Update(contact);
this.m_buddytree_widget.sort_allitems(true);
Label_0116:
this._contactNotifyWindowManager.ContactPresenceChanged_NotifyWnd(contact, args.PresencePropertiesChangedEventArgs);
this._contactPresenceChangedCol.RemoveAt(i);
}
if (this._contactPresenceChangedCol.get_Count() <= 0)
{
GlobalTimer.Unregister(new EventHandler(this.handleContactPresenceChanged_Tick));
}
}
this.m_buddytree_widget.sort_allitems(true);
}
}
private void InitBuddyTree()
{
this.m_buddytree_widget.on_drop_contact_into_group += new buddytree_widget.drop_contact_into_group_handler(this.on_drop_contact_into_group);
this.m_buddytree_widget.on_drop_contacts_into_group += new buddytree_widget.drop_contacts_into_group_handler(this.on_drop_contacts_into_group);
this.m_buddytree_widget.on_group_expand_changed += new buddytree_widget.group_expand_changed_handler(this.on_group_expand_changed);
this.m_buddytree_widget.on_showdetail_change_cmd += new buddytree_widget.showstyle_change_cmd_handler(this.on_showdetail_change_cmd);
this.m_buddytree_widget.on_showdetailtip_change_cmd += new buddytree_widget.showstyle_change_cmd_handler(this.on_showdetailtip_change_cmd);
this.m_buddytree_widget.on_sortstyle_change_cmd += new buddytree_widget.sortstyle_change_cmd_handler(this.on_sortstyle_change_cmd);
}
private void InitializeComponent()
{
this.components = new Container();
ComponentResourceManager manager = new ComponentResourceManager(typeof(ContactListControl));
crystal_band_colors _colors = new crystal_band_colors();
crystal_band_colors _colors2 = new crystal_band_colors();
crystal_band_colors _colors3 = new crystal_band_colors();
this.imageListDrag = new ImageList(this.components);
this.imageListTree = new ImageList(this.components);
this.panelEmpty = new Panel();
this.pbInput = new PictureBox();
this.lblImport = new LinkLabel();
this.pbMatch = new PictureBox();
this.lblMatch = new LinkLabel();
this.label1 = new Label();
this.pbAddBuddy = new PictureBox();
this.lblAddBuddy = new LinkLabel();
this.m_buddytree_vscroll_widget = new vscroll_widget();
this.m_buddytree_widget = new buddytree_widget();
this.panelEmpty.SuspendLayout();
this.pbInput.BeginInit();
this.pbMatch.BeginInit();
this.pbAddBuddy.BeginInit();
base.SuspendLayout();
this.imageListDrag.ColorDepth = ColorDepth.Depth8Bit;
this.imageListDrag.ImageSize = new Size(0x10, 0x10);
this.imageListDrag.TransparentColor = Color.Transparent;
this.imageListTree.ImageStream = (ImageListStreamer) manager.GetObject("imageListTree.ImageStream");
this.imageListTree.TransparentColor = Color.Transparent;
this.imageListTree.Images.SetKeyName(0, "java_16x16.gif");
this.imageListTree.Images.SetKeyName(1, "女头像(灰度)_16x16.png");
this.panelEmpty.BackColor = Color.Transparent;
this.panelEmpty.Controls.Add(this.pbInput);
this.panelEmpty.Controls.Add(this.lblImport);
this.panelEmpty.Controls.Add(this.pbMatch);
this.panelEmpty.Controls.Add(this.lblMatch);
this.panelEmpty.Controls.Add(this.label1);
this.panelEmpty.Controls.Add(this.pbAddBuddy);
this.panelEmpty.Controls.Add(this.lblAddBuddy);
this.panelEmpty.Location = new System.Drawing.Point(14, 0x49);
this.panelEmpty.Name = "panelEmpty";
this.panelEmpty.Size = new Size(200, 0x8d);
this.panelEmpty.TabIndex = 4;
this.pbInput.set_ErrorImage(null);
this.pbInput.Location = new System.Drawing.Point(0x27, 0x66);
this.pbInput.Name = "pbInput";
this.pbInput.Size = new Size(0x18, 0x18);
this.pbInput.TabIndex = 6;
this.pbInput.TabStop = false;
this.lblImport.set_AutoSize(true);
this.lblImport.Font = new Font("SimSun", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
this.lblImport.Location = new System.Drawing.Point(0x45, 0x6b);
this.lblImport.Name = "lblImport";
this.lblImport.Size = new Size(0x43, 15);
this.lblImport.TabIndex = 5;
this.lblImport.TabStop = true;
this.lblImport.Text = "导入好友";
this.lblImport.Click += new EventHandler(this.lblImput_Click);
this.pbMatch.set_ErrorImage(null);
this.pbMatch.Location = new System.Drawing.Point(0x27, 0x48);
this.pbMatch.Name = "pbMatch";
this.pbMatch.Size = new Size(0x18, 0x18);
this.pbMatch.TabIndex = 4;
this.pbMatch.TabStop = false;
this.lblMatch.set_AutoSize(true);
this.lblMatch.Font = new Font("SimSun", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
this.lblMatch.Location = new System.Drawing.Point(0x45, 0x4d);
this.lblMatch.Name = "lblMatch";
this.lblMatch.Size = new Size(0x43, 15);
this.lblMatch.TabIndex = 3;
this.lblMatch.TabStop = true;
this.lblMatch.Text = "速配交友";
this.lblMatch.Click += new EventHandler(this.lblMatch_Click);
this.label1.set_AutoSize(true);
this.label1.Font = new Font("SimSun", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
this.label1.Location = new System.Drawing.Point(8, 10);
this.label1.Name = "label1";
this.label1.Size = new Size(0x6f, 13);
this.label1.TabIndex = 2;
this.label1.Text = "您现在还没有好友";
this.pbAddBuddy.set_ErrorImage(null);
this.pbAddBuddy.Location = new System.Drawing.Point(0x27, 0x2a);
this.pbAddBuddy.Name = "pbAddBuddy";
this.pbAddBuddy.Size = new Size(0x18, 0x18);
this.pbAddBuddy.TabIndex = 1;
this.pbAddBuddy.TabStop = false;
this.lblAddBuddy.set_AutoSize(true);
this.lblAddBuddy.Font = new Font("SimSun", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
this.lblAddBuddy.Location = new System.Drawing.Point(0x45, 0x2e);
this.lblAddBuddy.Name = "lblAddBuddy";
this.lblAddBuddy.Size = new Size(0x43, 15);
this.lblAddBuddy.TabIndex = 0;
this.lblAddBuddy.TabStop = true;
this.lblAddBuddy.Text = "添加好友";
this.lblAddBuddy.Click += new EventHandler(this.lblAddBuddy_Click);
this.m_buddytree_vscroll_widget.active_arrow_color = Color.FromArgb(0x48, 0x60, 0xa8);
this.m_buddytree_vscroll_widget.active_arrow_frame_color = Color.FromArgb(0x4a, 0x95, 0xcc);
this.m_buddytree_vscroll_widget.active_thumb_frame_color = Color.FromArgb(0x4a, 0x95, 0xcc);
this.m_buddytree_vscroll_widget.arrow_color = Color.FromArgb(0x88, 0x98, 0x98);
this.m_buddytree_vscroll_widget.begin_color = Color.FromArgb(0xf3, 0xf7, 250);
this.m_buddytree_vscroll_widget.cover_host = true;
this.m_buddytree_vscroll_widget.end_color = Color.FromArgb(0xe2, 0xea, 0xf3);
this.m_buddytree_vscroll_widget.for_buddytree = false;
this.m_buddytree_vscroll_widget.for_pane = false;
this.m_buddytree_vscroll_widget.frame_color = Color.FromArgb(0xe2, 0xea, 0xf3);
this.m_buddytree_vscroll_widget.hook_host = true;
this.m_buddytree_vscroll_widget.host = this.m_buddytree_widget;
this.m_buddytree_vscroll_widget.hot_begin_color = Color.FromArgb(0xf3, 0xf7, 250);
this.m_buddytree_vscroll_widget.hot_end_color = Color.FromArgb(0xd0, 0xe8, 0xf5);
this.m_buddytree_vscroll_widget.Location = new System.Drawing.Point(580, 0);
this.m_buddytree_vscroll_widget.Name = "m_buddytree_vscroll_widget";
this.m_buddytree_vscroll_widget.sensitive = true;
this.m_buddytree_vscroll_widget.Size = new Size(0x11, 0x147);
this.m_buddytree_vscroll_widget.TabIndex = 6;
this.m_buddytree_vscroll_widget.Text = "buddytree_vscroll_widget";
this.m_buddytree_vscroll_widget.thumb_frame_color = Color.FromArgb(0xa8, 0xc1, 0xda);
this.m_buddytree_vscroll_widget.toggle_begin_color = Color.FromArgb(0xf3, 0xf7, 250);
this.m_buddytree_vscroll_widget.toggle_end_color = Color.FromArgb(0xac, 0xe7, 0xff);
this.m_buddytree_vscroll_widget.tunnel_color = Color.FromArgb(0xff, 0xff, 0xff);
this.m_buddytree_widget.AllowDrop = true;
this.m_buddytree_widget.BackColor = SystemColors.Window;
this.m_buddytree_widget.collapse_image = (Image) manager.GetObject("m_buddytree_widget.collapse_image");
this.m_buddytree_widget.Cursor = Cursors.Default;
this.m_buddytree_widget.DisplayMode = BuddyTreeDisplayMode.SingleLine;
this.m_buddytree_widget.Dock = DockStyle.Fill;
this.m_buddytree_widget.Editable = true;
this.m_buddytree_widget.expand_image = (Image) manager.GetObject("m_buddytree_widget.expand_image");
this.m_buddytree_widget.F2Edit = true;
_colors.border_color = Color.FromArgb(180, 0xc6, 0xd6);
_colors.bottompart_down_color = Color.FromArgb(0xd7, 0xe5, 0xf7);
_colors.bottompart_up_color = Color.FromArgb(0xb3, 0xd0, 0xf5);
_colors.highlight_color = Color.FromArgb(0xff, 0xff, 0xff);
_colors.toppart_down_color = Color.FromArgb(0xc7, 220, 0xf8);
_colors.toppart_up_color = Color.FromArgb(0xd7, 230, 0xf9);
this.m_buddytree_widget.focus_band_colors = _colors;
_colors2.border_color = Color.FromArgb(100, 180, 0xc6, 0xd6);
_colors2.bottompart_down_color = Color.FromArgb(100, 0xd7, 0xe5, 0xf7);
_colors2.bottompart_up_color = Color.FromArgb(100, 0xb3, 0xd0, 0xf5);
_colors2.highlight_color = Color.FromArgb(0xff, 0xff, 0xff);
_colors2.toppart_down_color = Color.FromArgb(100, 0xc7, 220, 0xf8);
_colors2.toppart_up_color = Color.FromArgb(100, 0xd7, 230, 0xf9);
this.m_buddytree_widget.hover_band_colors = _colors2;
this.m_buddytree_widget.iframework_wnd = null;
this.m_buddytree_widget.Location = new System.Drawing.Point(0, 0);
this.m_buddytree_widget.multi_select = true;
this.m_buddytree_widget.Name = "m_buddytree_widget";
this.m_buddytree_widget.NormalCursor = Cursors.Default;
this.m_buddytree_widget.searching = false;
_colors3.border_color = Color.FromArgb(180, 0xc6, 0xd6);
_colors3.bottompart_down_color = Color.FromArgb(0xd7, 0xe5, 0xf7);
_colors3.bottompart_up_color = Color.FromArgb(0xb3, 0xd0, 0xf5);
_colors3.highlight_color = Color.FromArgb(0xff, 0xff, 0xff);
_colors3.toppart_down_color = Color.FromArgb(0xc7, 220, 0xf8);
_colors3.toppart_up_color = Color.FromArgb(0xd7, 230, 0xf9);
this.m_buddytree_widget.select_band_colors = _colors3;
this.m_buddytree_widget.show_detailtip = true;
this.m_buddytree_widget.Size = new Size(0x255, 0x147);
this.m_buddytree_widget.sort_style = buddytree_widget.SORTSTYLE.SORT_BY_GROUP;
this.m_buddytree_widget.TabIndex = 5;
this.m_buddytree_widget.Font = new Font("SimSun", 9f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
base.set_AutoScaleDimensions(new SizeF(6f, 12f));
base.set_AutoScaleMode(1);
this.BackColor = Color.White;
base.Controls.Add(this.m_buddytree_vscroll_widget);
base.Controls.Add(this.panelEmpty);
base.Controls.Add(this.m_buddytree_widget);
base.Name = "ContactListControl";
base.Size = new Size(0x255, 0x147);
base.Load += new EventHandler(this.ContactListControl_Load);
this.panelEmpty.ResumeLayout(false);
this.panelEmpty.PerformLayout();
this.pbInput.EndInit();
this.pbMatch.EndInit();
this.pbAddBuddy.EndInit();
base.ResumeLayout(false);
}
private void InitializeContextMenuComponent()
{
this.mr_d_Group = new menu_radioitem();
this.mr_d_Terminal = new menu_radioitem();
this.mr_d_Presence = new menu_radioitem();
this.mr_d_DetailMouseOver = new ToolStripMenuItem();
this.mw_DisplayMenu = new menu_widget(this.components);
new ToolStripSeparator().set_Enabled(false);
this.mr_d_Group.Radioed = true;
this.mr_d_Group.set_Name("tsmiGroup");
this.mr_d_Group.set_Size(new Size(0xce, 0x16));
this.mr_d_Group.set_Text("按分组(&G)");
this.mr_d_Group.add_Click(new EventHandler(this.mr_d_Group_Click));
this.mr_d_Terminal.set_Name("tsmiTer");
this.mr_d_Terminal.set_Size(new Size(0xce, 0x16));
this.mr_d_Terminal.set_Text("按终端分类(&T)");
this.mr_d_Terminal.add_Click(new EventHandler(this.mr_d_Ter_Click));
this.mr_d_Presence.set_Name("tsmiPresence");
this.mr_d_Presence.set_Size(new Size(0xce, 0x16));
this.mr_d_Presence.set_Text("按在线状态(&S)");
this.mr_d_Presence.add_Click(new EventHandler(this.mr_d_Presence_Click));
this.mr_d_DetailMouseOver.set_Name("tsmiDetailMouseOver");
this.mr_d_DetailMouseOver.set_Size(new Size(0xce, 0x16));
this.mr_d_DetailMouseOver.set_Text("鼠标悬停时显示更多信息(&M)");
this.mr_d_DetailMouseOver.add_Click(new EventHandler(this.mr_d_DetailMouseOver_Click));
ToolStripSeparator separator2 = new ToolStripSeparator();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -