Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
EnterRoomForm.xaml.cs
1using System;
2using System.Windows;
3using System.Windows.Controls;
4
6{
10 public partial class EnterRoomForm : Window
11 {
12 public EnterRoomForm(string Domain)
13 {
15
16 this.Domain.Text = Domain;
17 }
18
19 public EnterRoomForm(string RoomId, string Domain)
20 {
22
23 this.Title = "Enter room";
24 this.RoomID.Text = RoomId;
25 this.RoomID.IsReadOnly = true;
26 this.Domain.Text = Domain;
27 this.Domain.IsReadOnly = true;
28 this.AddButton.Content = "Enter";
29 this.AddButton.ToolTip = "Enter the Room.";
30 this.CancelButton.ToolTip = "Closes the dialog without entering the room.";
31
32 this.NickName.Focus();
33 }
34
35 private void CancelButton_Click(object Sender, RoutedEventArgs e)
36 {
37 this.DialogResult = false;
38 }
39
40 private void AddButton_Click(object Sender, RoutedEventArgs e)
41 {
42 this.DialogResult = true;
43 }
44
45 private void FormChanged(object Sender, TextChangedEventArgs e)
46 {
47 this.AddButton.IsEnabled =
48 !string.IsNullOrEmpty(this.RoomID.Text.Trim()) &&
49 !string.IsNullOrEmpty(this.Domain.Text.Trim()) &&
50 !string.IsNullOrEmpty(this.NickName.Text.Trim());
51 }
52 }
53}
Interaction logic for EnterRoomForm.xaml
void InitializeComponent()
InitializeComponent