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,53 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Aitex.Core.Common.DeviceData;
using Aitex.Core.RT.Log;
namespace MECF.Framework.UI.Client.Ctrlib.UnitControls
{
/// <summary>
/// InputFileNameDialogView.xaml 的交互逻辑
/// </summary>
public partial class AITRfSettingDialogView : UserControl
{
public AITRfSettingDialogView()
{
InitializeComponent();
}
private void InputTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
double input;
if (!double.TryParse(inputBox.Text, out input))
(this.DataContext as AITRfSettingDialogViewModel).IsEnableOk = false;
else if (input < 0 || input > (this.DataContext as AITRfSettingDialogViewModel).DeviceData.ScalePower)
(this.DataContext as AITRfSettingDialogViewModel).IsEnableOk = false;
else
(this.DataContext as AITRfSettingDialogViewModel).IsEnableOk = true;
inputBox.Foreground = (this.DataContext as AITRfSettingDialogViewModel).IsEnableOk ?
System.Windows.Media.Brushes.Black : System.Windows.Media.Brushes.Red;
}
private void OnEnterKeyIsHit(object sender, KeyEventArgs e)
{
try
{
if (!(this.DataContext as AITRfSettingDialogViewModel).IsEnableOk) return;
if (e.Key == Key.Return)
{
(this.DataContext as AITRfSettingDialogViewModel).SetPower();
}
}
catch (Exception ex)
{
LOG.Error(ex.Message);
}
}
}
}