private void OnNewPointButton_Click(object sender, RoutedEventArgs e) { CurrentPointNumber++; SharpKml.Base.Vector coord = new SharpKml.Base.Vector(0, 0); CoordsList.Add(coord); EditPointControl pointControl = new EditPointControl(coord, CurrentPointNumber); this.Stack.Children.Add(pointControl); }
public void ReadInput() { var puzzleInput = new List <string>(); var path = Path.Combine(Directory.GetCurrentDirectory(), InputFile); var result = new List <string>(); using (var reader = File.OpenText(path)) { var line = reader.ReadLine(); while (line != null) { var x1 = Int32.Parse(line.Split(',')[0]); var y2 = Int32.Parse(line.Split(',')[2]); var insideInput = line.Split(',')[1]; var y1 = Int32.Parse(insideInput.Split(new char[0])[0]); var x2 = Int32.Parse(insideInput.Split(new char[0])[2]); CoordsList.Add(new Coords(x1, y1, x2, y2)); line = reader.ReadLine(); } } }