예제 #1
0
 public void AddChild(UIEvent E)
 {
     UIEvents.Add(E);
     this.hasEvent = true;
     if (this.Mode == ModeOfTime.HOUR)
     {
         this.UIContent.Children.Add(E);
     }
     else
     {
         double tmpTop = 0;
         foreach (UIElement uiE in this.UIContentScroll.Children)
         {
             tmpTop = uiE.getTop() + (double)uiE.GetValue(HeightProperty);
         }
         E.setTop(tmpTop + 2);
         this.UIContentScroll.Children.Add(E);
         UIContentScroll.Height = tmpTop + 2 + E.Height;
     }
 }
예제 #2
0
 public void AddChild(UIEvent E)
 {
     UIEvents.Add(E);
     this.hasEvent = true;
     if (this.Mode == ModeOfTime.HOUR)
     {
         this.UIContent.Children.Add(E);
     }
     else
     {
         double tmpTop = 0;
         foreach (UIElement uiE in this.UIContentScroll.Children)
         {
             tmpTop = uiE.getTop() +(double) uiE.GetValue(HeightProperty);
         }
         E.setTop(tmpTop + 2);
         this.UIContentScroll.Children.Add(E);
         UIContentScroll.Height = tmpTop + 2 + E.Height;
     }
 }