Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                bool bEnumUsers = true;

                // I don't like comparing strings in this case... we will probably change this
                if (listMemberType == "Group")
                {
                    bEnumUsers = false;
                }
                else if (listMemberType != "User")
                {
                    return;
                }

                AddMemberDlg addMemberDlg = new AddMemberDlg();
                addMemberDlg.Label = listMemberType + ":";
                addMemberDlg.PopulatePage(_servername, bEnumUsers);

                if (addMemberDlg.ShowDialog() == DialogResult.OK)
                {
                    string[] arr = new string[1];
                    arr[0] = addMemberDlg.Member;
                    AddMember(arr, null);
                }

                editDialog.bDataWasChanged  = (membersAdded.Count + membersDeleted.Count + Description.Length > 0);
                editDialog.btnApply.Enabled = editDialog.bDataWasChanged;
            }
            catch (Exception exp)
            {
                container.ShowError(exp.Message);
            }
        }
Esempio n. 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                AddMemberDlg addMemberDlg = new AddMemberDlg();
                addMemberDlg.PopulatePage(_hn.hostName, true);

                if (addMemberDlg.ShowDialog() == DialogResult.OK)
                {
                    string[] arr = new string[1];
                    arr[0] = addMemberDlg.Member;
                    AddMember(arr, null);
                }
            }
            catch (Exception exp)
            {
                container.ShowError(exp.Message);
            }
        }
Esempio n. 3
0
    private void btnAdd_Click(object sender, EventArgs e)
    {
        try
        {
            AddMemberDlg addMemberDlg = new AddMemberDlg();
            addMemberDlg.PopulatePage(_hn.hostName, true);

            if (addMemberDlg.ShowDialog() == DialogResult.OK)
            {
                string[] arr = new string[1];
                arr[0] = addMemberDlg.Member;
                AddMember(arr, null);
            }
        }
        catch (Exception exp)
        {
            container.ShowError(exp.Message);
        }
    }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                bool bEnumUsers = true;

                // I don't like comparing strings in this case... we will probably change this
                if (listMemberType == "Group")
                {
                    bEnumUsers = false;
                }
                else if (listMemberType != "User")
                {
                    return;
                }

                AddMemberDlg addMemberDlg = new AddMemberDlg();
                addMemberDlg.Label = listMemberType + ":";
                addMemberDlg.PopulatePage(_servername, bEnumUsers);

                if (addMemberDlg.ShowDialog() == DialogResult.OK)
                {
                    string[] arr = new string[1];
                    arr[0] = addMemberDlg.Member;
                    AddMember(arr, null);
                }

                editDialog.bDataWasChanged = (membersAdded.Count + membersDeleted.Count + Description.Length > 0);
                editDialog.btnApply.Enabled = editDialog.bDataWasChanged;

            }
            catch (Exception exp)
            {
                container.ShowError(exp.Message);
            }

        }