private void ConferenceMessageBox(Conference c) { String conf_members = ""; foreach (var u in Conference.users) { if (u.is_us) { continue; } String num_add = u.party_name != u.party_number ? " - " + u.party_number : ""; String state = ConfStateConverter.StateConvert(u.state); if (!string.IsNullOrWhiteSpace(state)) { state = " (" + state + ")"; } conf_members += "Member " + u.party_name + state + num_add + "\n"; } MessageBox.Show(conf_members, "Conference with " + Conference.users.Where(u => !u.is_us).Count() + " others"); }
private MenuItem UserMenu(ConferenceUser user) { MenuItem main = new MenuItem(); MenuItem item; main.Header = user.party_name + " " + ConfStateConverter.StateConvert(user.state); item = new MenuItem() { Header = "Min Energy Level" }; for (int x = 0; x <= 1500; x += 150) { int val = x; String add = val == user.min_energy_level ? "*" : ""; item.Items.Add(CreateMenuItem("Level " + val + add, () => user.SetEnergyLevel(val))); } main.Items.Add(item); item = new MenuItem() { Header = "Their Volume Level" }; for (int x = -4; x <= 4; x++) { int val = x; String add = val == user.their_volume ? "*" : ""; item.Items.Add(CreateMenuItem("Level " + x + add, () => user.SetAudioLevel(val))); } main.Items.Add(item); item = new MenuItem() { Header = "Conference Volume Level" }; for (int x = -4; x <= 4; x++) { int val = x; String add = val == user.conference_volume ? "*" : ""; item.Items.Add(CreateMenuItem("Level " + x + add, () => user.SetAudioLevel(val, true))); } main.Items.Add(item); if (user.StateIs(ConferenceUser.USER_STATE.MUTE)) { main.Items.Add(CreateMenuItem("UnMute", () => user.Mute(true))); } else { main.Items.Add(CreateMenuItem("Mute", () => user.Mute())); } if (user.StateIs(ConferenceUser.USER_STATE.DEAF)) { main.Items.Add(CreateMenuItem("UnDeaf", () => user.Deaf(true))); } else { main.Items.Add(CreateMenuItem("Deaf", () => user.Deaf())); } if (!user.is_us) { main.Items.Add(CreateMenuItem("Split Out", user.Split)); } main.Items.Add(CreateMenuItem("Drop From Conference", user.Drop)); return(main); }