コード例 #1
0
            void HandleValueChanged(object sender, EventArgs e)
            {
                if (Math.Abs(Adjustment.Value - currentValue.Ticks) < 1)
                {
                    return;
                }

                if (selectedComponent == DateTimeComponent.None)
                {
                    SelectComponent(componentsSorted.Last());
                }

                if (Adjustment.Value > currentValue.Ticks)
                {
                    DateTime = currentValue.AddComponent(selectedComponent, 1);
                }
                else if (Adjustment.Value < currentValue.Ticks)
                {
                    DateTime = currentValue.AddComponent(selectedComponent, -1);
                }
            }