return;
minValue = value;
-
+ NotifyValueChanged ("Minimum", minValue);
+ registerForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(100.0)]
return;
maxValue = value;
-
+ NotifyValueChanged ("Maximum", maxValue);
+ registerForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(1.0)]
return;
smallStep = value;
-
+ NotifyValueChanged ("SmallIncrement", smallStep);
+ registerForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(5.0)]
return;
bigStep = value;
-
+ NotifyValueChanged ("LargeIncrement", bigStep);
+ registerForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(0)]
}
public void onScrollBack (object sender, MouseButtonEventArgs e)
{
- Scroll -= _slider.LargeIncrement;
+ Scroll -= 50;
}
public void onScrollForth (object sender, MouseButtonEventArgs e)
{
- Scroll += _slider.LargeIncrement;
+ Scroll += 50;
}
public void onSliderValueChange(object sender, ValueChangeEventArgs e){
- Scroll = Convert.ToDouble(e.NewValue);
- }
-
- public override void OnLayoutChanges (LayoutingType layoutType)
- {
- OpenTKGameWindow.currentWindow.CursorVisible = true;
- base.OnLayoutChanges (layoutType);
+ if (e.MemberName == "Value")
+ Scroll = Convert.ToDouble(e.NewValue);
}
}
}
public int MaximumScroll {
get {
return VerticalScrolling ?
- child == null ? 0 : Child.Slot.Height - ClientRectangle.Height :
- Child.Slot.Width - ClientRectangle.Width;
+ child == null ? 0 : Math.Max(Child.Slot.Height - ClientRectangle.Height,0) :
+ Math.Max(Child.Slot.Width - ClientRectangle.Width,0);
}
}
base.Maximum = value;
LargeIncrement = base.Maximum / 10.0;
SmallIncrement = LargeIncrement / 5.0;
-
}
}