Add TimeBox Control

This commit is contained in:
LiWenhao
2024-04-06 21:28:14 +08:00
parent e32f59f277
commit 72d962ab45
16 changed files with 960 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Net;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace Ursa.Demo.ViewModels;
public partial class TimeBoxDemoViewModel : ObservableObject
{
[ObservableProperty] private TimeSpan? _timeSpan;
[RelayCommand]
private void ChangeRandomTime()
{
TimeSpan = new TimeSpan(Random.Shared.NextInt64(0x00000000FFFFFFFF));
}
public TimeBoxDemoViewModel()
{
TimeSpan = new TimeSpan(0, 21, 11, 36, 54);
}
}