示例#1
0
 public void DeleteInstance(GraphicInstance graphicInstance)
 {
     RecursiveDeleteInstance(graphicInstance);
     InstancesContext.SubmitChanges();
     if (graphicInstance is RootInstance)
     {
         SetCanvasRootItem(null);
     }
 }
示例#2
0
 public InstancesManager()
 {
     if (IsNotDesigner())
     {
         myInstance       = this;
         InstancesContext = new InstancesContext();
         InstancesContext.GraphicInstances.EntityAdded   += GraphicInstances_EntityAdded;
         InstancesContext.GraphicInstances.EntityRemoved += GraphicInstances_EntityRemoved;
         DispatcherTimer timer = new DispatcherTimer {
             Interval = new TimeSpan(0, 0, 0, 0, 1000)
         };
         timer.Tick += new EventHandler(TimerTick);
         TypeLoader.Instance.Request(timer.Start);
     }
 }