private void CreateNewPoint(object sender, EventArgs e) { Point p = new Point(); PointForm pointForm = new PointForm(p); if (pointForm.ShowDialog() == DialogResult.OK) { AppModel.AddPoint(p); RefreshStatusString(); } }
private void editButton_Click(object sender, EventArgs e) { foreach (ListViewItem item in listView.SelectedItems) { Point point = (Point)item.Tag; PointForm pointForm = new PointForm(point); if (pointForm.ShowDialog() == DialogResult.OK) { AppModel.EditPoint(point); } } }
private void editButton_Click(object sender, EventArgs e) { TreeNode item = treeView.SelectedNode; if (item.Tag != null) { Point point = (Point)item.Tag; PointForm pointForm = new PointForm(point); if (pointForm.ShowDialog() == DialogResult.OK) { AppModel.EditPoint(point); } } }