示例#1
0
        private void editContainer(object sender, EventArgs e)
        {
            if (FeatCollection.SelectedItem == null)
            {
                return;
            }
            FeatureContainer selected = (FeatureContainer)FeatCollection.SelectedItem;

            if (selected != null)
            {
                string sel             = selected.Name;
                FeatureContainerForm r = new FeatureContainerForm(selected.Clone());
                r.Saved += ContainerSaved;
                r.Show();
            }
        }
示例#2
0
 public void MakeHistory(string id)
 {
     if (!doHistory)
     {
         return;
     }
     if (id == null)
     {
         id = "";
     }
     if (id == "" || id != lastid)
     {
         UndoBuffer.AddLast(container.Clone());
         RedoBuffer.Clear();
         onChange();
         if (UndoBuffer.Count > MaxBuffer)
         {
             UndoBuffer.RemoveFirst();
         }
         UnsavedChanges++;
     }
     lastid = id;
 }