Пример #1
0
        private void SendButton_Click(object sender, RoutedEventArgs e)
        {
            protocol.SendCommand(CommandBox.Text);

            //WatchoutControlProtocol.SendCommand(HostBox.Text, PortBox.Text, ResultTextBlock, CommandBox.Text);


            //protocol = new WatchoutControlProtocol(HostBox.Text, PortBox.Text, ResultTextBlock, CommandBox.Text);
        }
 private async Task SendCommand(string Command)
 {
     try
     {
         WatchoutDebug.Text += Command + "\n";
         var protocol = new WatchoutControlProtocol(App.WatchoutIP, App.WatchoutPort, null);// "10.1.1.28", "8080", null);
         await protocol.SendCommand("authenticate 1\r\n" + Command);
     }
     catch
     {
     }
 }