Add Int64Displayer control for long type support (#811)

This commit is contained in:
Copilot
2025-11-07 21:35:52 +08:00
committed by GitHub
parent d495c98967
commit 6941cef2a7
3 changed files with 28 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ namespace Ursa.Demo.ViewModels;
public partial class NumberDisplayerDemoViewModel: ObservableObject
{
[ObservableProperty] private int _value;
[ObservableProperty] private long _longValue;
[ObservableProperty] private double _doubleValue;
[ObservableProperty] private DateTime _dateValue;
public ICommand IncreaseCommand { get; }
@@ -15,6 +16,7 @@ public partial class NumberDisplayerDemoViewModel: ObservableObject
{
IncreaseCommand = new RelayCommand(OnChange);
Value = 0;
LongValue = 0L;
DoubleValue = 0d;
DateValue = DateTime.Now;
}
@@ -23,6 +25,7 @@ public partial class NumberDisplayerDemoViewModel: ObservableObject
{
Random r = new Random();
Value = r.Next(int.MaxValue);
LongValue = ((long)r.Next(int.MaxValue)) * 1000 + r.Next(1000);
DoubleValue = r.NextDouble() * 100000;
DateValue = DateTime.Today.AddDays(r.Next(1000));
}