Beispiel #1
0
 public void ApplyAll()
 {
     viewList = pop.viewList;
     if (viewList.Count > 0)
     {
         C2sSprotoType.applyfriend.request obj = new C2sSprotoType.applyfriend.request();
         List <C2sSprotoType.friendidlist> l   = new List <C2sSprotoType.friendidlist>();
         obj.friendlist = l;
         for (int i = 0; i < viewList.Count; i++)
         {
             FriendView v = viewList[i] as FriendView;
             if (v.data.isApply)
             {
                 C2sSprotoType.friendidlist f = new C2sSprotoType.friendidlist();
                 f.friendid = v.data.id;
                 f.type     = 0;
                 f.signtime = v.data.signtime;
                 l.Add(f);
             }
         }
         NetworkManager.Instance.FriendApply(obj);
         for (int i = 0; i < viewList.Count; i++)
         {
             FriendView v = pop.GetView(i);
             if (v != null)
             {
                 if (v.data.isApply != false)
                 {
                     v.data.isApply = false;
                     v.CheckBtn();
                 }
             }
         }
     }
 }
Beispiel #2
0
    public List <C2sSprotoType.friendidlist> GetFriendidList(FriendView v)
    {
        List <C2sSprotoType.friendidlist> l = new List <C2sSprotoType.friendidlist>();

        C2sSprotoType.friendidlist f = new C2sSprotoType.friendidlist();
        f.friendid = v.data.id;
        f.type     = 0;
        f.signtime = v.data.signtime;
        l.Add(f);
        return(l);
    }
Beispiel #3
0
    public List <C2sSprotoType.friendidlist> GetFriendidList(Hashtable list)
    {
        List <C2sSprotoType.friendidlist> l = new List <C2sSprotoType.friendidlist>();

        System.Collections.IDictionaryEnumerator enumerator = list.GetEnumerator();
        while (enumerator.MoveNext())
        {
            C2sSprotoType.friendidlist f = new C2sSprotoType.friendidlist();
            FriendView v = list[enumerator.Key] as FriendView;
            f.friendid = v.data.id;
            f.type     = 0;
            f.signtime = v.data.signtime;
            l.Add(f);
        }
        return(l);
    }
Beispiel #4
0
    public void Apply(FriendView v)
    {
        C2sSprotoType.applyfriend.request obj = new C2sSprotoType.applyfriend.request();
        List <C2sSprotoType.friendidlist> l   = new List <C2sSprotoType.friendidlist>();

        obj.friendlist = l;
        C2sSprotoType.friendidlist f = new C2sSprotoType.friendidlist();
        f.friendid = v.data.id;
        f.type     = 0;
        f.signtime = v.data.signtime;
        l.Add(f);
        NetworkManager.Instance.FriendApply(obj);

        v.data.isApply = false;
        v.CheckBtn();
    }