refactor: 将Framework库和RT、UI放在同一个解决方案中。

This commit is contained in:
SL
2026-06-01 17:48:28 +08:00
parent 1948f4290d
commit b73d39a6b1
4331 changed files with 506148 additions and 49363 deletions
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Input;
using Aitex.Core.UI.MVVM;
using Aitex.Core.Util;
using Aitex.Core.Utilities;
namespace SicUI.Controls.Common
{
public class ViewModelControl : UserControl, INotifyPropertyChanged, IViewModelControl
{
public event PropertyChangedEventHandler PropertyChanged;
public void SubscribeKeys(SubscriptionViewModelBase baseModel)
{
baseModel.SubscribeKeys(this);
}
public void InvokePropertyChanged()
{
if (PropertyChanged != null)
{
var ps = this.GetType().GetProperties();
foreach (var p in ps)
{
if (!p.GetCustomAttributes(false).Any(attribute => attribute is IgnorePropertyChangeAttribute))
PropertyChanged(this, new PropertyChangedEventArgs(p.Name));
if (p.PropertyType == typeof(ICommand))
{
if (p.GetValue(this, null) is IDelegateCommand cmd)
cmd.RaiseCanExecuteChanged();
}
}
}
}
}
}