Esempio n. 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));
                }
            }
        }
Esempio n. 2
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();
            }
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        private void DiffCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            HigherIDs = Storages.GetHigherRegion(UserID, ProjectID);

            CurrentDiffs.Clear();

            if (DiffCombo.Text == "Local")
            {
                CurrentDiffs.AddRange(HigherIDs);
                CurrentDiffs.AddRange(Trust.GetDownlinkIDs(UserID, ProjectID, 1));
            }

            else if (DiffCombo.Text == "Higher")
            {
                CurrentDiffs.AddRange(HigherIDs);
            }

            else if (DiffCombo.Text == "Lower")
            {
                CurrentDiffs.AddRange(Trust.GetDownlinkIDs(UserID, ProjectID, 1));
            }

            else if (DiffCombo.Text == "Custom...")
            {
                AddUsersDialog form = new AddUsersDialog(UI, ProjectID);

                if (form.ShowDialog(this) == DialogResult.OK)
                    CurrentDiffs.AddRange(form.People);

                // if cancel then no diffs are made, isnt too bad, there are situations you'd watch no diffs
            }

            FailedDiffs.Clear();

            foreach(ulong user in CurrentDiffs)
                Storages.Research(user);

            // clear out current diffs
            SelectedInfo.DiffsView = true; // show diff status panel

            RefreshView();
        }
Esempio n. 5
0
        private void PersonNavBrowse_Clicked(object sender, EventArgs e)
        {
            AddUsersDialog add = new AddUsersDialog(UI, SelectedProject);
            add.Text = "Select Person";
            add.AddButton.Text = "Select";
            add.MultiSelect = false;

            if (add.ShowDialog(this) == DialogResult.OK)
                OnSelectChange(add.Person, add.ProjectID);
        }