@@ -24,20 +24,35 @@ | |||||
<ItemsControl.ItemTemplate> | <ItemsControl.ItemTemplate> | ||||
<DataTemplate> | <DataTemplate> | ||||
<Grid> | <Grid> | ||||
<TextBlock | |||||
<!--<TextBlock | |||||
FontFamily="黑体" | FontFamily="黑体" | ||||
FontSize="16" | FontSize="16" | ||||
Foreground="{Binding Forground}" | Foreground="{Binding Forground}" | ||||
LineHeight="30" | LineHeight="30" | ||||
Text="{Binding LogInfo}" | Text="{Binding LogInfo}" | ||||
TextWrapping="Wrap"> | TextWrapping="Wrap"> | ||||
<!--<TextBlock.Effect> | |||||
--> | |||||
<!--<TextBlock.Effect> | |||||
<DropShadowEffect | <DropShadowEffect | ||||
Direction="0" | Direction="0" | ||||
Opacity="0.5" | Opacity="0.5" | ||||
ShadowDepth="5" | ShadowDepth="5" | ||||
Color="#20aefe" /> | Color="#20aefe" /> | ||||
</TextBlock.Effect>--> | </TextBlock.Effect>--> | ||||
<!-- | |||||
</TextBlock>--> | |||||
<TextBlock | |||||
FontFamily="黑体" | |||||
FontSize="16" | |||||
Foreground="{Binding Forground}" | |||||
LineHeight="30" | |||||
TextWrapping="Wrap"> | |||||
<TextBlock.Text> | |||||
<MultiBinding StringFormat="{}【{0:yyyy-MM-dd HH:mm:ss:ff}】 :{1}"> | |||||
<Binding Path="LogTime" /> | |||||
<Binding Path="LogInfo" /> | |||||
</MultiBinding> | |||||
</TextBlock.Text> | |||||
</TextBlock> | </TextBlock> | ||||
</Grid> | </Grid> | ||||
</DataTemplate> | </DataTemplate> | ||||
@@ -312,7 +312,7 @@ | |||||
Margin="10,0,0,0" | Margin="10,0,0,0" | ||||
HorizontalAlignment="Left" | HorizontalAlignment="Left" | ||||
Style="{StaticResource DataTextBlockStyle}" | Style="{StaticResource DataTextBlockStyle}" | ||||
Text="{Binding RunLogInfo}" /> | |||||
Text="{Binding RecipeName}" /> | |||||
<Border | <Border | ||||
Grid.ColumnSpan="6" | Grid.ColumnSpan="6" | ||||
@@ -40,6 +40,16 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public class MessageModel : ObservableObject | public class MessageModel : ObservableObject | ||||
{ | { | ||||
private DateTime _logTime; | |||||
/// <summary> | |||||
/// 记录打印时间。 | |||||
/// </summary> | |||||
public DateTime LogTime | |||||
{ | |||||
get { return _logTime; } | |||||
set { _logTime = value; } | |||||
} | |||||
public string LogInfo { get { return _mLogInfo; } set { _mLogInfo = value; OnPropertyChanged(); } } | public string LogInfo { get { return _mLogInfo; } set { _mLogInfo = value; OnPropertyChanged(); } } | ||||
private string _mLogInfo; | private string _mLogInfo; | ||||
@@ -28,6 +28,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//ff20aefe | //ff20aefe | ||||
var temp = new MessageModel() | var temp = new MessageModel() | ||||
{ | { | ||||
LogTime = DateTime.Now, | |||||
LogInfo = o, | LogInfo = o, | ||||
Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254)) | Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254)) | ||||
}; | }; | ||||
@@ -45,6 +46,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//FFF53F62 | //FFF53F62 | ||||
var temp = new MessageModel() | var temp = new MessageModel() | ||||
{ | { | ||||
LogTime=DateTime.Now, | |||||
LogInfo = o, | LogInfo = o, | ||||
Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98)) | Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98)) | ||||
}; | }; | ||||
@@ -62,6 +64,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//ff20aefe | //ff20aefe | ||||
var temp = new MessageModel() | var temp = new MessageModel() | ||||
{ | { | ||||
LogTime=DateTime.Now, | |||||
LogInfo = o, | LogInfo = o, | ||||
Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254)) | Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254)) | ||||
}; | }; | ||||
@@ -78,6 +81,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//FFF53F62 | //FFF53F62 | ||||
var temp = new MessageModel() | var temp = new MessageModel() | ||||
{ | { | ||||
LogTime = DateTime.Now, | |||||
LogInfo = o, | LogInfo = o, | ||||
Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98)) | Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98)) | ||||
}; | }; | ||||
@@ -1025,7 +1025,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model | |||||
SiemensDevice.Siemens_PLC_S7.WriteClass<XL_Finish_DB>(RecipeFinishInfo, 2261); | SiemensDevice.Siemens_PLC_S7.WriteClass<XL_Finish_DB>(RecipeFinishInfo, 2261); | ||||
MessageNotify.GetInstance.ShowRunLog($"托盘1,配方【{res.RecipeCode}】,配料完成,数据反馈给西门子"); | MessageNotify.GetInstance.ShowRunLog($"托盘1,配方【{res.RecipeCode}】,配料完成,数据反馈给西门子"); | ||||
MessageNotify.GetInstance.ShowRecipeLog(res.RecipeName); | |||||
MessageNotify.GetInstance.ShowRecipeLog($"配方名称:【{res.RecipeName}】\t 配方号:【{res.RecipeCode}】"); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||