예제 #1
0
파일: Form1.cs 프로젝트: spiceexyz/Sharpcon
 /// <summary>
 /// Called when a key is pressed in the command box
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBoxCommand_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((ConsoleKey)e.KeyChar == ConsoleKey.Enter)
     {
         WebSocketsWrapper.SendCommand(textBoxCommand.Text);
     }
 }
예제 #2
0
 public static void UpdatePlayers()
 {
     while (WebSocketsWrapper.IsConnected())
     {
         WebSocketsWrapper.SendCommand("playerlist");
         Thread.Sleep(TimeSpan.FromSeconds(10));
     }
 }
예제 #3
0
파일: Form1.cs 프로젝트: spiceexyz/Sharpcon
 /// <summary>
 /// Called when "Send" (command) button is clicked
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonCommand_Click(object sender, EventArgs e)
 {
     WebSocketsWrapper.SendCommand(textBoxCommand.Text);
 }