Skip to content

Commit fdff62b

Browse files
authored
Update README.md
1 parent 8e644d5 commit fdff62b

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

README.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,4 @@
11
<p align="center"><img src="http://aparanblog.do.am/fixed.png"></p></br><br>
2-
```C#
3-
private Point CorrespondingPoint(Point pt)
4-
{
5-
double xmin = 0;
6-
double xmax = 6.5;
7-
double ymin = -1.1;
8-
double ymax = 1.1;
9-
10-
var result = new Point
11-
{
12-
X = (pt.X - xmin) * canvas.Width / (xmax - xmin),
13-
Y = canvas.Height - (pt.Y - ymin) * canvas.Height / (ymax - ymin)
14-
};
15-
return result;
16-
}
17-
private void Draw_Graph_Click(object sender, RoutedEventArgs e)
18-
{
19-
HttpClient client = new HttpClient();
20-
JavaScriptSerializer jss = new JavaScriptSerializer();
21-
string url = string.Format("http://localhost:53901/api/plot");
22-
client.GetAsync(url).ContinueWith(resurse =>
23-
{
24-
HttpResponseMessage message = client.GetAsync(url).Result;
25-
string responseText = message.Content.ReadAsStringAsync().Result;
26-
List<Point> list = jss.Deserialize<List<Point>>(responseText);
27-
28-
Dispatcher.BeginInvoke(DispatcherPriority.Normal,
29-
(Action)(() =>
30-
{
31-
foreach (var item in list)
32-
{
33-
polyline.Points.Add(CorrespondingPoint(new Point(item.X, item.Y)));
34-
}
35-
canvas.Children.Add(polyline);
36-
}));
37-
}
38-
39-
40-
41-
);
42-
}
43-
44-
45-
```
462

473

484
<h4>Author <a href="https://github.com/tigranv">Tigran Vardanyan</a><h4>

0 commit comments

Comments
 (0)