예제 #1
0
        private void SendToCloud <T>(T val)
        {
            var uri           = new Uri(uri_box.Text);
            var json          = JsonConvert.SerializeObject(val);
            var stringContent = new StringContent(json, Encoding.UTF8, "application/json");

            // Fire and forget
            Task.Run(async() =>
            {
                var resp = await client.PostAsync(uri, stringContent);
                if (!resp.IsSuccessStatusCode)
                {
                    vis.setLogger(resp.ToString());
                }
            });
        }
예제 #2
0
 public void writetologger(string s)
 {
     vis.setLogger(s);
 }