コード例 #1
0
        public OverlayedSlider(string overlayText, DoubleCollection ticks)
        {
            InitializeComponent();

            tbOverlay.Text = overlayText;
            slValue.Minimum = ticks.First();
            slValue.Maximum = ticks.Last();
            slValue.Ticks = ticks;
        }
コード例 #2
0
        public OverlayedSlider(string overlayText, DoubleCollection ticks)
        {
            InitializeComponent();

            tbOverlay.Text  = overlayText;
            slValue.Minimum = ticks.First();
            slValue.Maximum = ticks.Last();
            slValue.Ticks   = ticks;
        }
コード例 #3
0
 public SliderViewModel(int statIndex, int valueIndex, IEnumerable <double> ticks)
 {
     StatIndex  = statIndex;
     ValueIndex = valueIndex;
     Ticks      = new DoubleCollection(ticks);
     Minimum    = Ticks.First();
     Maximum    = Ticks.Last();
     _value     = (float)Minimum;
     ShowSlider = Ticks.Count > 1;
 }
コード例 #4
0
        public SliderViewModel(int valueIndex, IEnumerable <int> ticks)
        {
            ValueIndex = valueIndex;
            var tickList = ticks.ToList();

            Ticks      = new DoubleCollection(tickList.Select(i => (double)i));
            Minimum    = Ticks.First();
            Maximum    = Ticks.Last();
            _value     = tickList.LastOrDefault();
            ShowSlider = Ticks.Count > 1;
        }