整理控件库

This commit is contained in:
GG Z
2025-05-05 17:04:06 +08:00
parent 74532b77be
commit 3eaad7566e
283 changed files with 2156 additions and 17846 deletions

View File

@@ -7,7 +7,6 @@ using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
using Bogus;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
@@ -29,7 +28,7 @@ namespace ShrlAlgo.Addin.Test;
[ObservableObject]
public partial class ActionWindow
{
public List<Customer> Customers => GetCustomers().ToList();
// public List<Customer> Customers => GetCustomers().ToList();
public ActionWindow()
{
@@ -37,27 +36,27 @@ public partial class ActionWindow
DataContext = this;
}
public IEnumerable<Customer> GetCustomers()
{
Randomizer.Seed = new Random(123456);
var ordergenerator = new Faker<Order>()
.RuleFor(o => o.Id, Guid.NewGuid)
.RuleFor(o => o.Date, f => f.Date.Past(3))
.RuleFor(o => o.OrderValue, f => f.Finance.Amount(0, 10000))
.RuleFor(o => o.Shipped, f => f.Random.Bool(0.9f));
var customerGenerator = new Faker<Customer>()
.RuleFor(c => c.Id, Guid.NewGuid())
.RuleFor(c => c.Name, f => f.Company.CompanyName())
.RuleFor(c => c.Address, f => f.Address.FullAddress())
.RuleFor(c => c.City, f => f.Address.City())
.RuleFor(c => c.Country, f => f.Address.Country())
.RuleFor(c => c.ZipCode, f => f.Address.ZipCode())
.RuleFor(c => c.Phone, f => f.Phone.PhoneNumber())
.RuleFor(c => c.Email, f => f.Internet.Email())
.RuleFor(c => c.ContactName, (f, c) => f.Name.FullName())
.RuleFor(c => c.Orders, f => ordergenerator.Generate(f.Random.Number(10)).ToList());
return customerGenerator.Generate(100);
}
// public IEnumerable<Customer> GetCustomers()
// {
// Randomizer.Seed = new Random(123456);
// var ordergenerator = new Faker<Order>()
// .RuleFor(o => o.Id, Guid.NewGuid)
// .RuleFor(o => o.Date, f => f.Date.Past(3))
// .RuleFor(o => o.OrderValue, f => f.Finance.Amount(0, 10000))
// .RuleFor(o => o.Shipped, f => f.Random.Bool(0.9f));
// var customerGenerator = new Faker<Customer>()
// .RuleFor(c => c.Id, Guid.NewGuid())
// .RuleFor(c => c.Name, f => f.Company.CompanyName())
// .RuleFor(c => c.Address, f => f.Address.FullAddress())
// .RuleFor(c => c.City, f => f.Address.City())
// .RuleFor(c => c.Country, f => f.Address.Country())
// .RuleFor(c => c.ZipCode, f => f.Address.ZipCode())
// .RuleFor(c => c.Phone, f => f.Phone.PhoneNumber())
// .RuleFor(c => c.Email, f => f.Internet.Email())
// .RuleFor(c => c.ContactName, (f, c) => f.Name.FullName())
// .RuleFor(c => c.Orders, f => ordergenerator.Generate(f.Random.Number(10)).ToList());
// return customerGenerator.Generate(100);
// }
[ObservableProperty]
private string code;