private void button2_Click(object sender, EventArgs e) { FormNewUser oForm = new FormNewUser(); if (oForm.ShowDialog(this) == DialogResult.OK) { Communications.CommandBus.UserCreate(oForm.textBox1.Text, oForm.textBox2.Text); //Sleep until found... while (true) { FillUsers(); if (cbUsers.Items.Count > 0) { break; } System.Threading.Thread.Sleep(5000); } } }
private void button6_Click(object sender, EventArgs e) { //Create new user FormNewUser oForm = new FormNewUser(); if (oForm.ShowDialog(this) == DialogResult.OK) { Guid id = Communications.CommandBus.UserCreate(oForm.textBox1.Text, oForm.textBox2.Text).ARId; MessageBox.Show(id.ToString()); } }