Ejemplo n.º 1
0
 protected void initHandlers(ThenOrElseItemPanel panel)
 {
     panel.Added              += OnAdd;
     panel.Deleted            += OnDelete;
     panel.IfActionSelected   += OnIfActionSelect;
     panel.ChangeEventHandler += onChange;
 }
Ejemplo n.º 2
0
 public UIElement GetNewSubItemPanel(Instruction child)
 {
     if (this.isThenBloc || this.isElseBloc)
     {
         if (child != null && child.isBlock())
         {
             BlockPanel panel = new BlockPanel();
             panel.IsReadOnly = this.IsReadOnly;
             panel.Display(child);
             initHandlers(panel);
             return(panel);
         }
         else
         {
             ThenOrElseItemPanel panel = new ThenOrElseItemPanel();
             panel.SetReadOnly(this.IsReadOnly);
             panel.Display(child);
             panel.Height = 30;
             initHandlers(panel);
             return(panel);
         }
     }
     return(null);
 }