/// <summary> /// 注销键值所对应的托盘图标 /// </summary> /// <param name="holder"></param> public void DisposAreaIcon(string holder) { if (AllowAreaIcon && AreaIcons.ContainsKey(holder)) { } else { throw new ArgumentException("No Such Icon"); } }
/// <summary> /// 申请托盘图标,通过键值访问 /// </summary> /// <param name="holder">键值</param> public void RegisterAreaIcon(string holder) { if (AllowAreaIcon && !AreaIcons.ContainsKey(holder)) { } else { throw new ArgumentException("Icon not allowed"); } }
/// <summary> /// 注销键值所对应的托盘图标 /// </summary> /// <param name="holder"></param> public void DisposAreaIcon(string holder) { if (AllowAreaIcon && AreaIcons.ContainsKey(holder)) { AreaIcons[holder].Areaicon = null; AreaIcons[holder] = null; AreaIcons.Remove(holder); } else { throw new ArgumentException("No Such Icon"); } }
/// <summary> /// 申请托盘图标,通过键值访问 /// </summary> /// <param name="holder">键值</param> public void RegisterAreaIcon(string holder) { if (AllowAreaIcon && !AreaIcons.ContainsKey(holder)) { AreaIcons.Add(holder, new YT_AreaIcon()); AreaIcons[holder].AttachedWindow = this; AreaIcons[holder].HolderName = holder; } else { throw new ArgumentException("Icon not allowed"); } }