-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgram.cs
34 lines (29 loc) · 879 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net;
using System.Windows.Forms;
using Windows.Devices.Geolocation;
using Windows.Foundation;
using TcpLib;
namespace GeolocationTCP
{
class Program
{
private static TcpServer server;
private static GeolocationProvider provider;
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
MainWindow w = new MainWindow();
Locator locator = new Locator(w);
provider = new GeolocationProvider();
server = new TcpServer(provider, 15555);
server.SetLocator(locator);
server.Start();
Application.Run(w);
}
}
}