Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string email = emailTextBox.Text;
            string pass  = passwordTextBox.Text;


            client.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 8000));

            var stream = client.GetStream();


            var json = JsonConvert.SerializeObject(new
            {
                email = email,
                pass  = pass
            });

            var arr = Helper.StringToBytes(json);

            stream.Write(arr, 0, arr.Length);

            exp.IsExpanded = true;
        }