|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Quartz.Util;
|
|
|
|
|
using SlnMesnac.Business;
|
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
|
using SlnMesnac.WPF.MessageTips;
|
|
|
|
|
using SlnMesnac.WPF.Model;
|
|
|
|
|
using SlnMesnac.WPF.ViewModel;
|
|
|
|
|
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.Shapes;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.WPF.Page
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class InputDialogWindow : Window
|
|
|
|
|
{
|
|
|
|
|
//系统频率配方缓存
|
|
|
|
|
private RecipeManageCache recipeManageCache = RecipeManageCache.Instance;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public InputDialogWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
MaxWeightTxt.Text = recipeManageCache.MaxBufferWeight.ToString();
|
|
|
|
|
MinWeightTxt.Text = recipeManageCache.MinBufferWeight.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void MaxWeightChangeButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
bool flag = double.TryParse(MaxWeightTxt.Text,out double maxValue);
|
|
|
|
|
bool flag2 = double.TryParse(MinWeightTxt.Text,out double minValue);
|
|
|
|
|
if (flag&&flag2&& maxValue>minValue)
|
|
|
|
|
{
|
|
|
|
|
recipeManageCache.MaxBufferWeight = maxValue;
|
|
|
|
|
recipeManageCache.MinBufferWeight = minValue;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Msg.MsgShow("请输入合理的重量", 0, 5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|