Exemplo n.º 1
0
    public void MakeList()
    {
        foreach (Transform p in content.GetComponentsInChildren <Transform>())
        {
            if (p != content)
            {
                Destroy(p.gameObject);
            }
        }

        int y = 40 * GameManager.game.guild.members.Count - 40;
        int i = 0;

        if (GameManager.game == null)
        {
            return;
        }

        foreach (Classes member in GameManager.game.guild.members)
        {
            i++;
            MemberRow r = Instantiate(row);

            content.GetComponent <RectTransform>().sizeDelta       = new Vector2(332, 80 * i);
            GetComponent <ScrollRect>().verticalNormalizedPosition = 1;

            r.transform.parent        = content;
            r.transform.localPosition = new Vector3(0, y, 0);

            y -= 72;
            r.Setup(member);
        }
    }
Exemplo n.º 2
0
 public AddOrUpdateMember(int id)
 {
     InitializeComponent();
     row                  = memberTableAdapter1.GetData().FirstOrDefault(p => p.ID == id);
     txtName.Text         = row.Name;
     txtMail.Text         = row.Email;
     txtPassword.Text     = row.Password;
     txtSurname.Text      = row.Surname;
     txtUsername.Text     = row.UserName;
     lookupPerm.EditValue = row.FormPermId;
     isNew                = false;
 }