Exemplo n.º 1
0
        private void AddShapeButton_Click(object sender, EventArgs e)
        {
            ShapeEditorWindow shapeEditorWindow = new ShapeEditorWindow(this);

            shapeEditorWindow.OnEndEdit += Shape_OnEndEdit;
            shapeEditorWindow.Show();
            Editors.Add(shapeEditorWindow);
        }
Exemplo n.º 2
0
        private void EditShapeButton_Click(object sender, EventArgs e)
        {
            string guid = (string)ShapeView.Rows[ShapeView.CurrentCell.RowIndex].Cells[0].Value;

            bool found = false;

            foreach (Shape shape in Data.Shapes)
            {
                if (shape.GUID.ToUpper() == guid.ToUpper())
                {
                    ShapeEditorWindow shapeEditor = new ShapeEditorWindow(this, shape);
                    shapeEditor.OnEndEdit += Shape_OnEndEdit;
                    Editors.Add(shapeEditor);
                    shapeEditor.Show();
                    found = true;
                    break;
                }
            }

            if (!found)
            {
                MessageBox.Show("Could not find shape with GUID: \"" + guid.ToUpper() + "\".", "Error!");
            }
        }