示例#1
0
        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();
            }
        }
示例#2
0
 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);
         }
     }
 }
示例#3
0
        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);
                }
            }
        }