Пример #1
0
        private void EditUsersButton_Click(object sender, EventArgs e)
        {
            // open users form and use a callback when closed to update the users list
            if (Application.OpenForms.OfType <EditUsersForm>().Count() > 0)
            {
                Application.OpenForms.OfType <EditUsersForm>().First().Close();
            }
            var UserForm = new EditUsersForm(usersList, this, currentUser);

            UserForm.ShowDialog();
        }
Пример #2
0
        public AddUser(EditUsersForm parent, List <User> userList)
        {
            InitializeComponent();
            pForm = parent;

            xtr.Load(directory + @"\Module_Timetable_Database.xml");
            int i = 0;

            foreach (XmlNode uID in xtr.DocumentElement.SelectNodes("//Name"))
            {
                comboBoxGroup.Items.Insert(i, uID.InnerText);
                i++;
            }

            comboBoxGroup.SelectedIndex = 0;
            users = userList;
        }