using KGIS.Framework.Utils; using KGIS.Framework.Utils.Helper; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Kingo.Plugin.AttributeMaintain.View { /// /// FrmLSYDGLBSMParameter.xaml 的交互逻辑 /// public partial class FrmLSYDGLBSMParameter : BaseWindow { public double AreaRatio { get; set; } public FrmLSYDGLBSMParameter() { InitializeComponent(); } private void BtnOK_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrEmpty(txtAreaRatio.Text)) { bool changed = double.TryParse(txtAreaRatio.Text, out double txtAreaRatioValue); if (!changed) { MessageHelper.ShowTips("请输入合理容差值!"); return; } if (txtAreaRatioValue < 0 || txtAreaRatioValue > 100) { MessageHelper.ShowTips("输入值请保持在0到100中间!"); return; } } else { MessageHelper.ShowTips("请输入合理容差值!"); return; } AreaRatio = double.Parse(txtAreaRatio.Text); DialogResult = true; this.Close(); } } }