📄 systemfixedcontactgroup.cs
字号:
namespace Imps.Client.Pc.BizControls
{
using Imps.Client.Core;
using System;
using System.Runtime.CompilerServices;
public class SystemFixedContactGroup
{
private ContactCollection _contacts;
private int _id;
private IsBelongDelegete _isBelong;
private string _name;
private User _owner;
private int _sortIndex;
public event EventHandler InfoChanged;
public SystemFixedContactGroup(User owner, int id, string name, int sortIndex, IsBelongDelegete isBelongDelegete)
{
this._owner = owner;
this._isBelong = isBelongDelegete;
this._name = name;
this._id = id;
this._sortIndex = sortIndex;
this._contacts = new ContactCollection();
}
public bool IsBelong(Contact contact)
{
if (this._isBelong != null)
{
return this._isBelong(contact);
}
return false;
}
public bool UpdateBelong(Contact contact)
{
if (this.IsBelong(contact))
{
if (this.Contacts[contact.Uri.Raw] == null)
{
this.Contacts.Add(contact);
if (this.InfoChanged != null)
{
this.InfoChanged(this, EventArgs.Empty);
}
}
return true;
}
if (this.Contacts[contact.Uri.Raw] != null)
{
this.Contacts.Remove(contact);
if (this.InfoChanged != null)
{
this.InfoChanged(this, EventArgs.Empty);
}
}
return false;
}
public ContactCollection Contacts
{
get
{
return this._contacts;
}
}
public int Id
{
get
{
return this._id;
}
}
public string Name
{
get
{
return this._name;
}
}
public User Owner
{
get
{
return this._owner;
}
}
public int SortIndex
{
get
{
return this._sortIndex;
}
}
public delegate bool IsBelongDelegete(Contact contact);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -