Blame view

src/MapConsole/Program.cs 1.12 KB
a036a6c0   Yarik   Console
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
  using System;
  
  namespace MapConsole
  {
      public class Program
      {
          public static void Main(string[] args)
          {
              string line = "";
              do {
                  Console.WriteLine("Введите комманду");
                  line = Console.ReadLine();
                  Action(line);
              } while (line != "exit");
          }
  
          protected static void Action(string action)
          {
              OsmImport osm = new OsmImport();
              switch (action) {
                  case "create":
                      osm.Create();
                      break;
                  case "update":
                      osm.Update();
                      break;
                  case "index":
                      osm.Index();
                      break;
                  case "relation":
                      osm.Relation().Wait();
                      break;
c386d9eb   Yarik   Big commit
33
34
35
36
37
                  case "relationId":
                      Console.WriteLine("Введите ID");
                      string line = Console.ReadLine();
                      osm.Relation(Int32.Parse(line)).Wait();
                      break;
a036a6c0   Yarik   Console
38
39
40
41
              }
          }
      }
  }