コード例 #1
0
 private void RegisterData(Treap <DataType> .TreapNode o, DataType data)
 {
     MyDisposable.MyDisposableEventHandler  disposedEventHandler      = null;
     MyDisposable.HeightChangedEventHandler heightChangedEventHandler = null;
     disposedEventHandler = new MyDisposable.MyDisposableEventHandler(() =>
     {
         data.Disposed      -= disposedEventHandler;
         data.HeightChanged -= heightChangedEventHandler;
         treap.Delete(o);
         OnTreapLayoutChanged();
         OnDataRemoved(data);
     });
     heightChangedEventHandler = new MyDisposable.HeightChangedEventHandler((difference) =>
     {
         treap.ChangeHeight(o, difference);
         OnTreapLayoutChanged();
     });
     data.Disposed      += disposedEventHandler;
     data.HeightChanged += heightChangedEventHandler;
     OnDataInserted(data);
 }
コード例 #2
0
 protected void ChangeHeight(Treap <DataType> .TreapNode node, double difference)
 {
     treap.ChangeHeight(node, difference);
 }