Ejemplo n.º 1
0
 public bool ExistMemberControl(RegionMemberInfo memberData)
 {
     if (m_MemeberDataCache.ContainsKey(memberData.PrimaryKey))
     {
         return m_ControlMapping.Exist(memberData.PrimaryKey);
     }
     else
     {
         throw new ArgumentNullException("memberData未注册。");
     }
 }
        public RegionMemberControl(RegionMemberInfo tag)
        {
            InitializeComponent();
            lblPeerNumber.Text = "";
            this.DoubleBuffered = true;
            Tag = tag;
            if (tag is RegionCallInfo)
            {
                tag.ProrertyChanged += new EventHandler<Event.PropertyChangedEventArgs>(PhoneControl_ProrertyChanged);
            }
            else if (tag is RegionCameraInfo)
            {
                tag.ProrertyChanged += new EventHandler<Event.PropertyChangedEventArgs>(CameraControl_ProrertyChanged);
            }
            this.Load += new EventHandler(SingleUserControl_Load);

            InitInnerControl();
        }
Ejemplo n.º 3
0
 public void RegeditMemberData(RegionMemberInfo memberData)
 {
     if (!m_MemeberDataCache.ContainsKey(memberData.PrimaryKey))
     {
         m_MemeberDataCache.Add(memberData.PrimaryKey, memberData);
     }
     else
     {
         throw new Exception(string.Format("memberData:{0} 已注册。", memberData.PrimaryKey));
     }
 }
 /// <summary>
 /// 新建成员控件
 /// </summary>
 /// <param name="memberData"></param>
 /// <returns></returns>
 private RegionMemberControl CreateMemberControlByData(RegionMemberInfo memberData)
 {
     RegionMemberControl control = new RegionMemberControl(memberData);
     control.Click += new EventHandler(memberControl_Click);
     //原代码结构不变,从_memberManage中查找保存的原结构号码信息
     if (memberData.MemberType != CommControl.PublicEnums.EnumRegionMemberType.Camera)
     {
         SingleUserControl baseControl = Pub._memberManage.GetSingleControl(Convert.ToInt64(memberData.PrimaryKey));
         control.Tag.Name = baseControl.MemberName;
         (control.Tag as RegionCallInfo).DestNumber = baseControl.PeerNumber;
         (control.Tag as RegionCallInfo).UserLineStatus = baseControl.UserLineStatus;
     }
     return control;
 }