Exemplo n.º 1
0
 private void Add()
 {
     using (LayerDialog dialog = new LayerDialog()
     {
         Layer = (Layer)TemplateLayer.Clone()
     })
     {
         if (dialog.ShowDialog(this) == DialogResult.OK)
         {
             Network.Add(dialog.Layer);
             UpdateItems();
         }
     }
 }
Exemplo n.º 2
0
        private void Edit(int index)
        {
            Layer layer = Network[index];

            using (LayerDialog dialog = new LayerDialog()
            {
                Layer = layer.Clone() as Layer
            })
            {
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    Network[index] = dialog.Layer;
                    UpdateItems();
                }
            }
        }