Beispiel #1
0
        private void AddLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            AddUsersDialog form = new AddUsersDialog(View.UI, View.ProjectID);


            if (form.ShowDialog(this) == DialogResult.OK)
            {
                foreach (ulong id in form.People)
                {
                    bool add = true;

                    foreach (VisItem item in VisList.Items)
                    {
                        if (item.UserID == id)
                        {
                            add = false;
                        }
                    }

                    if (add)
                    {
                        VisList.Items.Add(new VisItem(Core.GetName(id), id, -1));
                    }
                }
            }
        }
Beispiel #2
0
        private void AddLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            AddUsersDialog add = new AddUsersDialog(UI, 0);

            if(add.ShowDialog() == DialogResult.OK)
                foreach(ulong person in add.People)
                    if(person != Core.UserID && !InList.Contains(person))
                    {
                        IgnoreList.Items.Add(new IgnoreItem(Core, person));
                        InList.Add(person);
                    }
        }
Beispiel #3
0
        private void AddLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            AddUsersDialog add = new AddUsersDialog(UI, 0);

            if (add.ShowDialog() == DialogResult.OK)
            {
                foreach (ulong person in add.People)
                {
                    if (person != Core.UserID && !InList.Contains(person))
                    {
                        IgnoreList.Items.Add(new IgnoreItem(Core, person));
                        InList.Add(person);
                    }
                }
            }
        }
Beispiel #4
0
        private void PickLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            AddUsersDialog add = new AddUsersDialog(View.UI, Editing.Project);

            // force root to self, only if self is not in a loop, in which case anyone in loop can be assigned sub-goals
            //if(!Core.Links.LocalLink.LoopRoot.ContainsKey(Editing.Project)), assignment loops, not obvious behavior
            add.TrustTree.ForceRootID = Core.UserID;

            add.TrustTree.HideUnlinked = true;
            add.ProjectCombo.Visible   = false;

            if (add.ShowDialog(this) == DialogResult.OK)
            {
                if (add.People.Count > 0)
                {
                    SetPerson(add.People[0]);
                }
            }
        }
Beispiel #5
0
        private void BrowseTo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            AddUsersDialog add = new AddUsersDialog(UI, 0);

            string prefix = ToTextBox.Text.Length > 0 ? ", " : "";

            if (add.ShowDialog(this) == DialogResult.OK)
            {
                foreach (ulong id in add.People)
                {
                    if (!ToIDs.Contains(id))
                    {
                        ToIDs.Add(id);
                    }
                }

                UpdateToText();
            }
        }
Beispiel #6
0
        private void InviteButton_Click(object sender, EventArgs e)
        {
            if (Custom == null)
            {
                return;
            }

            AddUsersDialog add = new AddUsersDialog(UI, ProjectID);

            add.Text           = "Invite People";
            add.AddButton.Text = "Invite";

            if (add.ShowDialog(this) == DialogResult.OK)
            {
                foreach (ulong id in add.People)
                {
                    Chat.SendInviteRequest(Custom, id);
                }
            }
        }