11 public string RoomName
13 get => this.lblRoomName.Text;
14 set => this.lblRoomName.Text = value;
17 public string InviteTo {
set => this.lblInviteTo.Text = value; }
18 public string InviteFrom {
set => this.lblInviteFrom.Text = value; }
19 public string InvitationReason {
set => this.lblInvitationReason.Text = value; }
20 public string RoomJid {
set => this.lblRoomJid.Text = value; }
21 public bool MembersOnly {
set => this.lblMembersOnly.Text = ToStr(value); }
22 public bool Moderated {
set => this.lblModerated.Text = ToStr(value); }
23 public bool NonAnonymous {
set => this.lblNonAnonymous.Text = ToStr(value); }
24 public bool Open {
set => this.lblOpen.Text = ToStr(value); }
25 public bool PasswordProtected {
set => this.lblPasswordProtected.Text = ToStr(value); }
26 public bool Persistent {
set => this.lblPersistent.Text = ToStr(value); }
27 public bool Public {
set => this.lblPublic.Text = ToStr(value); }
28 public bool SemiAnonymous {
set => this.lblSemiAnonymous.Text = ToStr(value); }
29 public bool Temporary {
set => this.lblTemporary.Text = ToStr(value); }
30 public bool Unmoderated {
set => this.lblUnmoderated.Text = ToStr(value); }
31 public bool Unsecured {
set => this.lblUnsecured.Text = ToStr(value); }
38 private static string ToStr(
bool b)
40 return b ?
"✓" :
string.Empty;
43 private void CancelButton_Click(
object Sender, RoutedEventArgs e)
45 this.DialogResult =
false;
48 private void NickName_TextChanged(
object Sender, System.Windows.Controls.TextChangedEventArgs e)
50 this.AcceptButton.IsEnabled = !
string.IsNullOrEmpty(this.NickName.Text) && AllLetters(this.NickName.Text);
53 private static bool AllLetters(
string s)
55 foreach (
char ch
in s)
57 if (!
char.IsLetterOrDigit(ch))
64 private void AcceptButton_Click(
object Sender, RoutedEventArgs e)
66 this.DialogResult =
true;
69 private void DeclineButton_Click(
object Sender, RoutedEventArgs e)
71 this.DialogResult =
false;