Merge pull request #115 from irihitech/issue/53

fix: fix #53.
This commit is contained in:
Zhang Dian
2024-02-26 14:59:45 +08:00
committed by GitHub
7 changed files with 50 additions and 26 deletions

View File

@@ -1,6 +1,20 @@
using System;
using System.Net;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Ursa.Demo.ViewModels;
public class IPv4BoxDemoViewModel: ViewModelBase
public partial class IPv4BoxDemoViewModel: ObservableObject
{
[ObservableProperty] private IPAddress? _address;
public IPv4BoxDemoViewModel()
{
Address = IPAddress.Parse("192.168.1.1");
}
public void ChangeAddress()
{
long l = Random.Shared.NextInt64(0x00000000FFFFFFFF);
Address = new IPAddress(l);
}
}