Initial commit to new repository

This commit is contained in:
2026-04-03 18:22:19 +09:00
commit 4458bb0f52
7672 changed files with 452440 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Media;
namespace AxCopilot.ViewModels;
public class ColorRowModel : INotifyPropertyChanged
{
private string _hex;
public string Label { get; init; } = "";
public string Property { get; init; } = "";
public string Hex
{
get
{
return _hex;
}
set
{
_hex = value;
OnPropertyChanged("Hex");
OnPropertyChanged("Preview");
}
}
public SolidColorBrush Preview
{
get
{
try
{
return new SolidColorBrush((Color)ColorConverter.ConvertFromString(Hex));
}
catch
{
return new SolidColorBrush(Colors.Transparent);
}
}
}
public event PropertyChangedEventHandler? PropertyChanged;
public ColorRowModel(string label, string property, string hex)
{
Label = label;
Property = property;
_hex = hex;
}
protected void OnPropertyChanged([CallerMemberName] string? n = null)
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(n));
}
}