Sfoglia il codice sorgente

1. 修改配方完成日志打印及显示界面。 2.调试日志打印时添加时间显示。

master
ZhaoGang 1 anno fa
parent
commit
964f818557
5 ha cambiato i file con 33 aggiunte e 4 eliminazioni
  1. +17
    -2
      BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml
  2. +1
    -1
      BPASmartClient.CustomResource/Pages/View/RecipeCompleteView.xaml
  3. +10
    -0
      BPASmartClient.CustomResource/Pages/ViewModel/DebugLogViewModel.cs
  4. +4
    -0
      BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs
  5. +1
    -1
      BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs

+ 17
- 2
BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml Vedi File

@@ -24,20 +24,35 @@
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock
<!--<TextBlock
FontFamily="黑体"
FontSize="16"
Foreground="{Binding Forground}"
LineHeight="30"
Text="{Binding LogInfo}"
TextWrapping="Wrap">
<!--<TextBlock.Effect>
-->
<!--<TextBlock.Effect>
<DropShadowEffect
Direction="0"
Opacity="0.5"
ShadowDepth="5"
Color="#20aefe" />
</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>
</Grid>
</DataTemplate>


+ 1
- 1
BPASmartClient.CustomResource/Pages/View/RecipeCompleteView.xaml Vedi File

@@ -312,7 +312,7 @@
Margin="10,0,0,0"
HorizontalAlignment="Left"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding RunLogInfo}" />
Text="{Binding RecipeName}" />

<Border
Grid.ColumnSpan="6"


+ 10
- 0
BPASmartClient.CustomResource/Pages/ViewModel/DebugLogViewModel.cs Vedi File

@@ -40,6 +40,16 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel

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(); } }
private string _mLogInfo;



+ 4
- 0
BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs Vedi File

@@ -28,6 +28,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel
//ff20aefe
var temp = new MessageModel()
{
LogTime = DateTime.Now,
LogInfo = o,
Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254))
};
@@ -45,6 +46,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel
//FFF53F62
var temp = new MessageModel()
{
LogTime=DateTime.Now,
LogInfo = o,
Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98))
};
@@ -62,6 +64,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel
//ff20aefe
var temp = new MessageModel()
{
LogTime=DateTime.Now,
LogInfo = o,
Forground = new SolidColorBrush(Color.FromArgb(255, 32, 174, 254))
};
@@ -78,6 +81,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel
//FFF53F62
var temp = new MessageModel()
{
LogTime = DateTime.Now,
LogInfo = o,
Forground = new SolidColorBrush(Color.FromArgb(255, 245, 63, 98))
};


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs Vedi File

@@ -1025,7 +1025,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
SiemensDevice.Siemens_PLC_S7.WriteClass<XL_Finish_DB>(RecipeFinishInfo, 2261);

MessageNotify.GetInstance.ShowRunLog($"托盘1,配方【{res.RecipeCode}】,配料完成,数据反馈给西门子");
MessageNotify.GetInstance.ShowRecipeLog(res.RecipeName);
MessageNotify.GetInstance.ShowRecipeLog($"配方名称:【{res.RecipeName}】\t 配方号:【{res.RecipeCode}】");
}
else
{


Caricamento…
Annulla
Salva