Esempio n. 1
0
 void Server_ClientDisconnected(object sender, ExcaliburServer.ClientEventArgs e)
 {
     RemoteCount--;
     if (RemoteDisconnected != null)
     {
         RemoteDisconnected(this, new RemoteEventArgs(e.Client.RemoteEndPoint));
     }
 }
Esempio n. 2
0
 void Server_ClientConnected(object sender, ExcaliburServer.ClientEventArgs e)
 {
     RemoteCount++;
     if (RemoteConnected != null)
     {
         RemoteConnected(this, new RemoteEventArgs(e.Client.RemoteEndPoint));
     }
     e.Client.MessageReceived += Client_MessageReceived;
     foreach (KeyValuePair <string, Setting> setting in Settings)
     {
         e.Client.SendMessage("s!" + setting.Key + "=" + setting.Value.StringValue);
     }
     foreach (KeyValuePair <string, RoutedUICommand> command in Commands)
     {
         e.Client.SendMessage("c!" + command.Key + "=" + command.Value.Text);
     }
 }