00001 using System; 00002 using System.Collections.Generic; 00003 using System.ComponentModel; 00004 using System.Data; 00005 using System.Drawing; 00006 using System.Linq; 00007 using System.Text; 00008 using System.Windows.Forms; 00009 using UtmConvert; 00010 00011 namespace RacePlotter { 00012 public partial class PointEditor : Form { 00013 public delegate void pointEditEventHandler(); 00014 public event pointEditEventHandler pointEditEvent; 00015 00016 UtmPoint _pt; 00017 00018 public PointEditor(UtmPoint pt) { 00019 InitializeComponent(); 00020 _pt = pt; 00021 utmPointPropertyGrid.SelectedObject = _pt; 00022 pointPropertyGrid.SelectedObject = _pt.Point; 00023 this.Text = "Edit Point: " 00024 + Math.Round(_pt.Point.X, 2).ToString() + ", " 00025 + Math.Round(_pt.Point.Y, 2).ToString(); 00026 } 00027 00028 private void editButton_Click(object sender, EventArgs e) { 00029 if (pointEditEvent != null) 00030 pointEditEvent.Invoke(); 00031 } 00032 00033 private void doneBlutton_Click(object sender, EventArgs e) { 00034 this.Close(); 00035 } 00036 00037 public UtmPoint getEditedPoint() { 00038 return _pt; 00039 } 00040 00041 } 00042 }