核对处方及根据状态判断能否勾选
This commit is contained in:
parent
4cf2de08e1
commit
9f918d8aeb
|
@ -16,7 +16,7 @@ namespace DM_Weight.Converter
|
|||
int iLength = value[0].ToString().Length;
|
||||
int ButtonDrawerNo = int.Parse(value[0].ToString().Substring(0, iLength-3));
|
||||
int SelectedDrawerNo = int.Parse(value[1].ToString());
|
||||
return ButtonDrawerNo == SelectedDrawerNo;
|
||||
return ButtonDrawerNo == SelectedDrawerNo+1;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
|
|
|
@ -162,6 +162,7 @@ namespace DM_Weight.ViewModels
|
|||
public bool IsEnabled18 { get => _IsEnabled18; set => SetProperty(ref _IsEnabled18, value); }
|
||||
#endregion
|
||||
|
||||
#region 按钮颜色
|
||||
private Brush _button1Color = Brushes.White;
|
||||
public Brush Button1Color
|
||||
{
|
||||
|
@ -270,6 +271,7 @@ namespace DM_Weight.ViewModels
|
|||
get => _button18Color;
|
||||
set => SetProperty(ref _button18Color, value);
|
||||
}
|
||||
#endregion
|
||||
|
||||
IEventAggregator _eventAggregator;
|
||||
private PortUtil _portUtil;
|
||||
|
@ -761,7 +763,7 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = Convert.ToInt32(strDrawerNo);
|
||||
MachineRecord machineRecord = new MachineRecord();
|
||||
machineRecord.MachineId = "DM5";
|
||||
machineRecord.DrawerNo = DrawerNo;
|
||||
machineRecord.DrawerNo = DrawerNo + 1;
|
||||
machineRecord.Operator = HomeWindowViewModel.Operator?.Id;
|
||||
machineRecord.OperationTime = DateTime.Now;
|
||||
machineRecord.Type = 55;
|
||||
|
@ -770,7 +772,6 @@ namespace DM_Weight.ViewModels
|
|||
|
||||
if (DrawerNo > 0)
|
||||
{
|
||||
DrawerNo -= 1;
|
||||
RequestData();
|
||||
Status = 1;
|
||||
_portUtil.SpeakAsync($"正在打开{DrawerNo + 1}号药箱");
|
||||
|
@ -781,11 +782,16 @@ namespace DM_Weight.ViewModels
|
|||
//设置对应药箱按钮可用状态
|
||||
SetIsEnableStatus(DrawerNo, false);
|
||||
//_eventAggregator.GetEvent<BoxOpenStatusEvent>().Publish();
|
||||
CheckBoxStatusTimer = new System.Timers.Timer();
|
||||
|
||||
CheckBoxStatusTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetAllBoxState);
|
||||
CheckBoxStatusTimer.Interval = 3000;
|
||||
CheckBoxStatusTimer.Start();
|
||||
if (CheckBoxStatusTimer is null)
|
||||
{
|
||||
CheckBoxStatusTimer = new System.Timers.Timer();
|
||||
}
|
||||
if (!CheckBoxStatusTimer.Enabled)
|
||||
{
|
||||
CheckBoxStatusTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetAllBoxState);
|
||||
CheckBoxStatusTimer.Interval = 3000;
|
||||
CheckBoxStatusTimer.Start();
|
||||
}
|
||||
//设置对应药箱按钮可用状态
|
||||
//SetIsEnableStatus(DrawerNo, false);
|
||||
}
|
||||
|
@ -869,11 +875,14 @@ namespace DM_Weight.ViewModels
|
|||
//查询药箱是否关闭,如果已经关闭则按钮可用,可继续开该编号的药箱
|
||||
if (DrawerNo >= 0)
|
||||
{
|
||||
bool[] boolArrs = { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false };// ModbusHelper.GetInstance().GetAllBoxState();
|
||||
bool[] boolArrs = ModbusHelper.GetInstance().GetAllBoxState();
|
||||
bool allFalse = Array.TrueForAll(boolArrs, b => b == false);
|
||||
if (allFalse)
|
||||
{
|
||||
CheckBoxStatusTimer.Stop();
|
||||
if (CheckBoxStatusTimer.Enabled)
|
||||
{
|
||||
CheckBoxStatusTimer.Stop();
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < boolArrs.Length; i++)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DM_Weight.ViewModels
|
||||
|
@ -23,6 +24,7 @@ namespace DM_Weight.ViewModels
|
|||
internal class CheckSelfOrderWindowViewModel : BindableBase, INavigationAware, IRegionMemberLifetime
|
||||
{
|
||||
private readonly ILog logger = LogManager.GetLogger(typeof(CheckOrderNewWindowViewModel));
|
||||
System.Timers.Timer CheckBoxStatusTimer;
|
||||
private int _drawerType = -1;
|
||||
|
||||
public int DrawerType
|
||||
|
@ -147,6 +149,7 @@ namespace DM_Weight.ViewModels
|
|||
private OrderInfo _selectOrderInfo;
|
||||
public OrderInfo selectOrderInfo { get => _selectOrderInfo; set => SetProperty(ref _selectOrderInfo, value); }
|
||||
|
||||
#region 按钮颜色
|
||||
private Brush _button1Color = Brushes.White;
|
||||
public Brush Button1Color
|
||||
{
|
||||
|
@ -363,7 +366,7 @@ namespace DM_Weight.ViewModels
|
|||
get => _button18Enable;
|
||||
set => SetProperty(ref _button18Enable, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
//设置按钮颜色
|
||||
private void SetBtnColor(int drawerNo)
|
||||
{
|
||||
|
@ -428,108 +431,108 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
}
|
||||
//设置按钮可用状态
|
||||
private void SetBtnEnable(int drawerNo)
|
||||
private void SetBtnEnable(int drawerNo,bool status)
|
||||
{
|
||||
switch (drawerNo)
|
||||
{
|
||||
case 1:
|
||||
Button1Enable = true;
|
||||
//SelfEnable=true;
|
||||
Button1Enable = status;
|
||||
//SelfEnable=status;
|
||||
break;
|
||||
case 2:
|
||||
Button2Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button2Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 3:
|
||||
Button3Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button3Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 4:
|
||||
Button4Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button4Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 5:
|
||||
Button5Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button5Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 6:
|
||||
Button6Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button6Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 7:
|
||||
Button7Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button7Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 8:
|
||||
Button8Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button8Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 9:
|
||||
Button9Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button9Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 10:
|
||||
Button10Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button10Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 11:
|
||||
Button11Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button11Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 12:
|
||||
Button12Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button12Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 13:
|
||||
Button13Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button13Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 14:
|
||||
Button14Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button14Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 15:
|
||||
Button15Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button15Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 16:
|
||||
Button16Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button16Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 17:
|
||||
Button17Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button17Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
case 18:
|
||||
Button18Enable = true;
|
||||
//SelfEnable = true;
|
||||
Button18Enable = status;
|
||||
//SelfEnable = status;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//打开某个药箱时不可点击其他药箱按钮避免保存数据时减错药箱库存(确认或取消后按钮即可用)
|
||||
private void SetAllBtnEnableFalse()
|
||||
{
|
||||
Button1Enable = false;
|
||||
Button2Enable = false;
|
||||
Button3Enable = false;
|
||||
Button4Enable = false;
|
||||
Button5Enable = false;
|
||||
Button6Enable = false;
|
||||
Button7Enable = false;
|
||||
Button8Enable = false;
|
||||
Button9Enable = false;
|
||||
Button10Enable = false;
|
||||
Button11Enable = false;
|
||||
Button12Enable = false;
|
||||
Button13Enable = false;
|
||||
Button14Enable = false;
|
||||
Button15Enable = false;
|
||||
Button16Enable = false;
|
||||
Button17Enable = false;
|
||||
Button18Enable = false;
|
||||
}
|
||||
////打开某个药箱时不可点击其他药箱按钮避免保存数据时减错药箱库存(确认或取消后按钮即可用)
|
||||
//private void SetAllBtnEnableFalse()
|
||||
//{
|
||||
// Button1Enable = false;
|
||||
// Button2Enable = false;
|
||||
// Button3Enable = false;
|
||||
// Button4Enable = false;
|
||||
// Button5Enable = false;
|
||||
// Button6Enable = false;
|
||||
// Button7Enable = false;
|
||||
// Button8Enable = false;
|
||||
// Button9Enable = false;
|
||||
// Button10Enable = false;
|
||||
// Button11Enable = false;
|
||||
// Button12Enable = false;
|
||||
// Button13Enable = false;
|
||||
// Button14Enable = false;
|
||||
// Button15Enable = false;
|
||||
// Button16Enable = false;
|
||||
// Button17Enable = false;
|
||||
// Button18Enable = false;
|
||||
//}
|
||||
IEventAggregator _eventAggregator;
|
||||
private PortUtil _portUtil;
|
||||
|
||||
|
@ -654,34 +657,34 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
else
|
||||
{
|
||||
GetUseBox();
|
||||
//List<ChannelList> chlList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5").ToList();//.Select(cl => cl.BelongUser).First();
|
||||
|
||||
List<ChannelList> chlList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5").ToList();//.Select(cl => cl.BelongUser).First();
|
||||
//if (chlList != null && chlList.Count > 0)
|
||||
//{
|
||||
// for (int i = 0; i < chlList.Count; i++)
|
||||
// {
|
||||
// ChannelList chl = chlList[i];
|
||||
// if (Convert.ToDateTime(chl.EffDate).ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
|
||||
// {
|
||||
// SetBtnColor(chl.DrawerNo);
|
||||
// }
|
||||
|
||||
if (chlList != null && chlList.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < chlList.Count; i++)
|
||||
{
|
||||
ChannelList chl = chlList[i];
|
||||
if (Convert.ToDateTime(chl.EffDate).ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
|
||||
{
|
||||
SetBtnColor(chl.DrawerNo);
|
||||
}
|
||||
|
||||
//DrawerType== 1为公共药箱
|
||||
if (chl.DrawerType == 1)
|
||||
{
|
||||
SetBtnEnable(chl.DrawerNo);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(chl.BelongUser) && chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
|
||||
{
|
||||
if (DrawerType == -1)
|
||||
{
|
||||
DrawerType = chl.DrawerType;
|
||||
}
|
||||
SetBtnEnable(chl.DrawerNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //DrawerType== 1为公共药箱
|
||||
// if (chl.DrawerType == 1)
|
||||
// {
|
||||
// SetBtnEnable(chl.DrawerNo);
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(chl.BelongUser) && chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
|
||||
// {
|
||||
// if (DrawerType == -1)
|
||||
// {
|
||||
// DrawerType = chl.DrawerType;
|
||||
// }
|
||||
// SetBtnEnable(chl.DrawerNo);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//查询当前药师下所有的待确认的单子
|
||||
string currentDrawerUser = HomeWindowViewModel.Operator.UserBarcode;
|
||||
OrderInfoList = SqlSugarHelper.Db.Queryable<OrderInfo>()
|
||||
|
@ -721,6 +724,7 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
public async void OpenBoxAction(string strDrawerNo)
|
||||
{
|
||||
//SetAllBtnEnableFalse();
|
||||
DrawerNo = Convert.ToInt32(strDrawerNo);
|
||||
//DrawerType = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5" && cl.DrawerNo == Convert.ToInt32(strDrawerNo)).Select(cl => cl.DrawerType).First();
|
||||
//SelfEnable = true;
|
||||
|
@ -750,6 +754,25 @@ namespace DM_Weight.ViewModels
|
|||
//记录开药箱日志
|
||||
SqlSugarHelper.Db.Insertable(machineRecord).ExecuteCommand();
|
||||
ModbusHelper.GetInstance().OpenBoxDoor(DrawerNo);
|
||||
SetBtnEnable(DrawerNo + 1, false);
|
||||
if (CheckBoxStatusTimer is null)
|
||||
{
|
||||
CheckBoxStatusTimer = new System.Timers.Timer();
|
||||
}
|
||||
if (!CheckBoxStatusTimer.Enabled)
|
||||
{
|
||||
CheckBoxStatusTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetAllBoxState);
|
||||
CheckBoxStatusTimer.Interval = 3000;
|
||||
CheckBoxStatusTimer.Start();
|
||||
}
|
||||
//记录药箱打开时间
|
||||
ChannelList channelList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5" && cl.DrawerNo == DrawerNo + 1).First();
|
||||
if (channelList != null && (channelList.EffDate is null || Convert.ToDateTime(channelList.EffDate).ToString("yyyy-MM-dd") != DateTime.Now.ToString("yyyy-MM-dd")))
|
||||
{
|
||||
|
||||
channelList.EffDate = DateTime.Now.ToString();
|
||||
SqlSugarHelper.Db.Updateable(channelList).UpdateColumns(it => new { it.EffDate }).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
//if (DrawerType == 1) //公共药箱
|
||||
//{
|
||||
|
@ -866,15 +889,13 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
get => new DelegateCommand(() =>
|
||||
{
|
||||
CheckOrderAction();
|
||||
GetUseBox();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void CheckOrderAction()
|
||||
{
|
||||
|
||||
SetBtnEnable(DrawerNo);
|
||||
var confirmData = OrderInfoList.Where(oi => oi.ItemIsChecked == true).ToList();
|
||||
if (confirmData.Count > 0)
|
||||
{
|
||||
|
@ -1095,6 +1116,7 @@ namespace DM_Weight.ViewModels
|
|||
Type = MsgType.SUCCESS,
|
||||
};
|
||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||
RequestData();
|
||||
}
|
||||
if (!f.IsSuccess)
|
||||
{
|
||||
|
@ -1127,7 +1149,35 @@ namespace DM_Weight.ViewModels
|
|||
RequestData();
|
||||
});
|
||||
}
|
||||
private void GetUseBox()
|
||||
{
|
||||
List<ChannelList> chlList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5").ToList();//.Select(cl => cl.BelongUser).First();
|
||||
if (chlList != null && chlList.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < chlList.Count; i++)
|
||||
{
|
||||
ChannelList chl = chlList[i];
|
||||
if (Convert.ToDateTime(chl.EffDate).ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
|
||||
{
|
||||
SetBtnColor(chl.DrawerNo);
|
||||
}
|
||||
|
||||
//DrawerType== 1为公共药箱
|
||||
if (chl.DrawerType == 1)
|
||||
{
|
||||
SetBtnEnable(chl.DrawerNo,true);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(chl.BelongUser) && chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
|
||||
{
|
||||
if (DrawerType == -1)
|
||||
{
|
||||
DrawerType = chl.DrawerType;
|
||||
}
|
||||
SetBtnEnable(chl.DrawerNo,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void OnNavigatedTo(NavigationContext navigationContext)
|
||||
{
|
||||
RequestData();
|
||||
|
@ -1135,6 +1185,7 @@ namespace DM_Weight.ViewModels
|
|||
int drawerNo = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5" && cl.BelongUser == HomeWindowViewModel.Operator.UserBarcode).Select(cl => cl.DrawerNo).First();
|
||||
if (drawerNo > 0)
|
||||
{
|
||||
//SetAllBtnEnableFalse();
|
||||
DrawerNo = drawerNo;
|
||||
//进入页面打开当前用户的第一个药箱
|
||||
//记录开药箱日志
|
||||
|
@ -1152,6 +1203,44 @@ namespace DM_Weight.ViewModels
|
|||
_portUtil.SpeakAsync($"正在打开{drawerNo}号药箱");
|
||||
logger.Info($"正在打开{drawerNo}号药箱");
|
||||
ModbusHelper.GetInstance().OpenBoxDoor(drawerNo - 1);
|
||||
SetBtnEnable(drawerNo, false);
|
||||
if (CheckBoxStatusTimer is null)
|
||||
{
|
||||
CheckBoxStatusTimer = new System.Timers.Timer();
|
||||
}
|
||||
if (!CheckBoxStatusTimer.Enabled)
|
||||
{
|
||||
CheckBoxStatusTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetAllBoxState);
|
||||
CheckBoxStatusTimer.Interval = 3000;
|
||||
CheckBoxStatusTimer.Start();
|
||||
}
|
||||
//记录药箱打开时间
|
||||
ChannelList channelList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5" && cl.DrawerNo == drawerNo).First();
|
||||
if (channelList != null && (channelList.EffDate is null || Convert.ToDateTime(channelList.EffDate).ToString("yyyy-MM-dd") != DateTime.Now.ToString("yyyy-MM-dd")))
|
||||
{
|
||||
|
||||
channelList.EffDate = DateTime.Now.ToString();
|
||||
SqlSugarHelper.Db.Updateable(channelList).UpdateColumns(it => new { it.EffDate }).ExecuteCommand();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private void GetAllBoxState(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
//查询药箱是否关闭,如果已经关闭则按钮可用,可继续开该编号的药箱
|
||||
if (DrawerNo >= 0)
|
||||
{
|
||||
bool[] boolArrs = ModbusHelper.GetInstance().GetAllBoxState();
|
||||
bool allFalse = Array.TrueForAll(boolArrs, b => b == false);
|
||||
if (allFalse)
|
||||
{
|
||||
if (CheckBoxStatusTimer.Enabled)
|
||||
{
|
||||
CheckBoxStatusTimer.Stop();
|
||||
}
|
||||
}
|
||||
//设置对应药箱按钮可用状态
|
||||
SetBtnEnable(DrawerNo, !boolArrs[DrawerNo]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignPaperLightButton}">
|
||||
<Setter Property="Foreground" Value="#00a0ea" />
|
||||
<Setter Property="BorderBrush" Value="#00a0ea" />
|
||||
<Style.Triggers>
|
||||
<!--<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#d1e7f5" />
|
||||
<Setter Property="BorderBrush" Value="#d1e7f5" />
|
||||
|
@ -55,7 +55,7 @@
|
|||
<Setter Property="Background" Value="#d1e7f5" />
|
||||
<Setter Property="BorderBrush" Value="#d1e7f5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style.Triggers>-->
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
|
@ -74,26 +74,26 @@
|
|||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Margin="0 0 3 0" Grid.Row="0" Grid.Column="0" Width="120" Content="1号药箱" Background="{Binding Button1Color}" Command="{Binding UpdateDrawerNo,ConverterParameter=1}" CommandParameter="1" IsEnabled="{Binding IsEnabled1}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="1" Grid.Column="0" Width="120" Content="2号药箱" Background="{Binding Button2Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="2" IsEnabled="{Binding IsEnabled2}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="2" Grid.Column="0" Width="120" Content="3号药箱" Background="{Binding Button3Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="3" IsEnabled="{Binding IsEnabled3}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="3" Grid.Column="0" Width="120" Content="4号药箱" Background="{Binding Button4Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="4" IsEnabled="{Binding IsEnabled4}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="4" Grid.Column="0" Width="120" Content="5号药箱" Background="{Binding Button5Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="5" IsEnabled="{Binding IsEnabled5}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="5" Grid.Column="0" Width="120" Content="6号药箱" Background="{Binding Button6Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="6" IsEnabled="{Binding IsEnabled6}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="6" Grid.Column="0" Width="120" Content="7号药箱" Background="{Binding Button7Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="7" IsEnabled="{Binding IsEnabled7}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="7" Grid.Column="0" Width="120" Content="8号药箱" Background="{Binding Button8Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="8" IsEnabled="{Binding IsEnabled8}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="0" Grid.Column="0" Width="120" Content="1号药箱" Background="{Binding Button1Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="0" IsEnabled="{Binding IsEnabled1}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="1" Grid.Column="0" Width="120" Content="2号药箱" Background="{Binding Button2Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="1" IsEnabled="{Binding IsEnabled2}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="2" Grid.Column="0" Width="120" Content="3号药箱" Background="{Binding Button3Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="2" IsEnabled="{Binding IsEnabled3}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="3" Grid.Column="0" Width="120" Content="4号药箱" Background="{Binding Button4Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="3" IsEnabled="{Binding IsEnabled4}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="4" Grid.Column="0" Width="120" Content="5号药箱" Background="{Binding Button5Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="4" IsEnabled="{Binding IsEnabled5}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="5" Grid.Column="0" Width="120" Content="6号药箱" Background="{Binding Button6Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="5" IsEnabled="{Binding IsEnabled6}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="6" Grid.Column="0" Width="120" Content="7号药箱" Background="{Binding Button7Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="6" IsEnabled="{Binding IsEnabled7}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="7" Grid.Column="0" Width="120" Content="8号药箱" Background="{Binding Button8Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="7" IsEnabled="{Binding IsEnabled8}"/>
|
||||
|
||||
<Button Margin="0 0 3 0" Grid.Row="8" Grid.Column="0" Width="120" Content="9号药箱" Background="{Binding Button9Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="9" IsEnabled="{Binding IsEnabled9}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="0" Grid.Column="1" Width="120" Content="10号药箱" Background="{Binding Button10Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="10" IsEnabled="{Binding IsEnabled10}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="8" Grid.Column="0" Width="120" Content="9号药箱" Background="{Binding Button9Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="8" IsEnabled="{Binding IsEnabled9}"/>
|
||||
<Button Margin="0 0 3 0" Grid.Row="0" Grid.Column="1" Width="120" Content="10号药箱" Background="{Binding Button10Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="9" IsEnabled="{Binding IsEnabled10}"/>
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="1" Width="120" Content="11号药箱" Background="{Binding Button11Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="11" IsEnabled="{Binding IsEnabled11}"/>
|
||||
<Button Grid.Row="2" Grid.Column="1" Width="120" Content="12号药箱" Background="{Binding Button12Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="12" IsEnabled="{Binding IsEnabled12}"/>
|
||||
<Button Grid.Row="3" Grid.Column="1" Width="120" Content="13号药箱" Background="{Binding Button13Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="13" IsEnabled="{Binding IsEnabled13}"/>
|
||||
<Button Grid.Row="4" Grid.Column="1" Width="120" Content="14号药箱" Background="{Binding Button14Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="14" IsEnabled="{Binding IsEnabled14}"/>
|
||||
<Button Grid.Row="5" Grid.Column="1" Width="120" Content="15号药箱" Background="{Binding Button15Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="15" IsEnabled="{Binding IsEnabled15}"/>
|
||||
<Button Grid.Row="6" Grid.Column="1" Width="120" Content="16号药箱" Background="{Binding Button16Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="16" IsEnabled="{Binding IsEnabled16}"/>
|
||||
<Button Grid.Row="7" Grid.Column="1" Width="120" Content="17号药箱" Background="{Binding Button17Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="17" IsEnabled="{Binding IsEnabled17}"/>
|
||||
<Button Grid.Row="8" Grid.Column="1" Width="120" Content="18号药箱" Background="{Binding Button18Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="18" IsEnabled="{Binding IsEnabled18}"/>
|
||||
<Button Grid.Row="1" Grid.Column="1" Width="120" Content="11号药箱" Background="{Binding Button11Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="10" IsEnabled="{Binding IsEnabled11}"/>
|
||||
<Button Grid.Row="2" Grid.Column="1" Width="120" Content="12号药箱" Background="{Binding Button12Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="11" IsEnabled="{Binding IsEnabled12}"/>
|
||||
<Button Grid.Row="3" Grid.Column="1" Width="120" Content="13号药箱" Background="{Binding Button13Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="12" IsEnabled="{Binding IsEnabled13}"/>
|
||||
<Button Grid.Row="4" Grid.Column="1" Width="120" Content="14号药箱" Background="{Binding Button14Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="13" IsEnabled="{Binding IsEnabled14}"/>
|
||||
<Button Grid.Row="5" Grid.Column="1" Width="120" Content="15号药箱" Background="{Binding Button15Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="14" IsEnabled="{Binding IsEnabled15}"/>
|
||||
<Button Grid.Row="6" Grid.Column="1" Width="120" Content="16号药箱" Background="{Binding Button16Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="15" IsEnabled="{Binding IsEnabled16}"/>
|
||||
<Button Grid.Row="7" Grid.Column="1" Width="120" Content="17号药箱" Background="{Binding Button17Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="16" IsEnabled="{Binding IsEnabled17}"/>
|
||||
<Button Grid.Row="8" Grid.Column="1" Width="120" Content="18号药箱" Background="{Binding Button18Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="17" IsEnabled="{Binding IsEnabled18}"/>
|
||||
<!--<Button Grid.Row="8" Grid.Column="1" Width="120" Content="19号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="19" IsEnabled="{Binding DrawerNo, Converter={StaticResource BoxNumConverter}, ConverterParameter=19}"/>
|
||||
<Button Grid.Row="9" Grid.Column="1" Width="120" Content="20号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="20" IsEnabled="{Binding DrawerNo, Converter={StaticResource BoxNumConverter}, ConverterParameter=20}"/>-->
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignPaperLightButton}">
|
||||
<Setter Property="Foreground" Value="#00a0ea" />
|
||||
<Setter Property="BorderBrush" Value="#00a0ea" />
|
||||
<Style.Triggers>
|
||||
<!--<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#d1e7f5" />
|
||||
<Setter Property="BorderBrush" Value="#d1e7f5" />
|
||||
|
@ -55,7 +55,7 @@
|
|||
<Setter Property="Background" Value="#d1e7f5" />
|
||||
<Setter Property="BorderBrush" Value="#d1e7f5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style.Triggers>-->
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
|
|
Loading…
Reference in New Issue