Beispiel #1
0
 //TODO: Review set event code. Disable set (throw error) or make sure all updates work as needed.
 void TableElementList_AfterSet(object sender, SetEventArgs <TableElement> e)
 {
     _NumberedTableElementsDictionary[e.OldItem.TableElementType].Remove(e.OldItem.Number);
     e.OldItem.ValueChanged -= new EventHandler <TableElementValueChangedEventArgs>(Item_ValueChanged);
     _NumberedTableElementsDictionary[e.NewItem.TableElementType].Add(e.NewItem.Number, e.NewItem);
     e.NewItem.ValueChanged += new EventHandler <TableElementValueChangedEventArgs>(Item_ValueChanged);
 }
Beispiel #2
0
 void TableElementList_BeforeSet(object sender, SetEventArgs <TableElement> e)
 {
     if (!Contains(e.NewItem.TableElementType, e.NewItem.Number) || (e.NewItem.TableElementType == e.OldItem.TableElementType && e.NewItem.Number == e.OldItem.Number))
     {
     }
     else
     {
         throw new Exception("Another TableElement with type {0} and number {1} does already exist in the list.".Build(e.NewItem.TableElementType, e.NewItem.Number));
     }
 }
Beispiel #3
0
 private void OnShortcutsUpdateSet(object sender, SetEventArgs e)
 {
     this.Invalidate();
 }
Beispiel #4
0
 void OutputList_AfterSet(object sender, SetEventArgs <IOutput> e)
 {
     e.OldItem.ValueChanged -= new Output.ValueChangedEventHandler(Item_ValueChanged);
     e.NewItem.ValueChanged += new Output.ValueChangedEventHandler(Item_ValueChanged);
 }
Beispiel #5
0
 private void OnGroupsUpdateSet(object sender, SetEventArgs e)
 {
     base.Invalidate();
 }