Преглед изворни кода

食堂分餐机大屏添加日期时间显示

煮面机(新)
ZhaoGang пре 1 година
родитељ
комит
b9fad2016e
7 измењених фајлова са 53 додато и 9 уклоњено
  1. +4
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml
  2. +12
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs
  3. +4
    -1
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml
  4. +12
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs
  5. +4
    -1
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml
  6. +11
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs
  7. +6
    -7
      BPASmartClient.ScreenSplitMeals/App.xaml

+ 4
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml Прегледај датотеку

@@ -94,6 +94,10 @@
</GroupBox>
<Grid x:Name="diqiu" Height="600" Width="950" Margin="0,10,0,20" >
<Image Style="{DynamicResource imagezhu}"></Image>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{Binding CurrentTime, StringFormat={}{0:HH:mm:ss}}" d:Text="10:53:22" FontSize="70" Margin="5"/>
<TextBlock Text="{Binding CurrentTime, StringFormat={}{0:yyyy-MM-dd}}" d:Text="20239-11-09" FontSize="35" Margin="5"/>
</StackPanel>
<Image Style="{DynamicResource image中1}" Margin="0,400,0,0"></Image>
<GroupBox Margin="600,100,0,500" Header="{Binding ViewData.FailuresCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="累计故障数" Content="次" Width="100"/>
<GroupBox Margin="600,400,0,0" Header="0" Style="{DynamicResource GroupStyle圆形}" Tag="故障次数" Content="次" Width="160"/>


+ 12
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs Прегледај датотеку

@@ -51,6 +51,17 @@ namespace BPASmartClient.ScreenLib
}
}
private int _OrderCount = 0;

private DateTime _CurrentTime = DateTime.Now;
/// <summary>
/// 当前时间
/// </summary>
public DateTime CurrentTime
{
get { return _CurrentTime; }
set { _CurrentTime = value; OnPropertyChanged(); }
}

#endregion

public ScreenSplitMealsControl1ViewModel()
@@ -68,6 +79,7 @@ namespace BPASmartClient.ScreenLib

OrderCount = modelMaxWok.SplitMeals_CreditCardCount_1 + modelMaxWok.SplitMeals_CreditCardCount_2;
}
CurrentTime = DateTime.Now;
}));
Thread.Sleep(100);
}), $"{DateTime.Now}_1,线程服务");


+ 4
- 1
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml Прегледај датотеку

@@ -92,7 +92,10 @@
<wv2:WebView2 Name="webView" />
</Grid>
</GroupBox>
<Grid x:Name="diqiu" Height="600" Width="950" Margin="0,10,0,20" > <Image Style="{DynamicResource imagezhu}"></Image> <Image Style="{DynamicResource image中1}" Margin="0,400,0,0"></Image> <GroupBox Margin="600,100,0,500" Header="{Binding ViewData.FailuresCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="累计故障数" Content="次" Width="100"/> <GroupBox Margin="600,400,0,0" Header="0" Style="{DynamicResource GroupStyle圆形}" Tag="故障次数" Content="次" Width="160"/> <GroupBox Margin="-500,100,0,0" Header="{Binding OrderCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="日总接待人数" Content="人" Width="160"/> </Grid>
<Grid x:Name="diqiu" Height="600" Width="950" Margin="0,10,0,20" > <Image Style="{DynamicResource imagezhu}"></Image> <Image Style="{DynamicResource image中1}" Margin="0,400,0,0"></Image> <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{Binding CurrentTime, StringFormat={}{0:HH:mm:ss}}" d:Text="10:53:22" FontSize="70" Margin="5"/>
<TextBlock Text="{Binding CurrentTime, StringFormat={}{0:yyyy-MM-dd}}" d:Text="20239-11-09" FontSize="35" Margin="5"/>
</StackPanel> <GroupBox Margin="600,100,0,500" Header="{Binding ViewData.FailuresCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="累计故障数" Content="次" Width="100"/> <GroupBox Margin="600,400,0,0" Header="0" Style="{DynamicResource GroupStyle圆形}" Tag="故障次数" Content="次" Width="160"/> <GroupBox Margin="-500,100,0,0" Header="{Binding OrderCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="日总接待人数" Content="人" Width="160"/> </Grid>
<GroupBox Margin="0,0,0,0" Height="340" Width="950" Header="信息通知区域" Style="{DynamicResource from}">
<DataGrid Margin="10,10,10,0" ItemsSource="{Binding ViewData.Alarm,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>


+ 12
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs Прегледај датотеку

@@ -51,6 +51,17 @@ namespace BPASmartClient.ScreenLib
}
}
private int _OrderCount = 0;


private DateTime _CurrentTime = DateTime.Now;
/// <summary>
/// 当前时间
/// </summary>
public DateTime CurrentTime
{
get { return _CurrentTime; }
set { _CurrentTime = value; OnPropertyChanged(); }
}
#endregion

public ScreenSplitMealsControl2ViewModel()
@@ -68,6 +79,7 @@ namespace BPASmartClient.ScreenLib
OrderCount = modelMaxWok.SplitMeals_CreditCardCount_3 + modelMaxWok.SplitMeals_CreditCardCount_4;

}
CurrentTime = DateTime.Now;
}));
Thread.Sleep(100);
}), $"{DateTime.Now}_2,线程服务");


+ 4
- 1
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml Прегледај датотеку

@@ -92,7 +92,10 @@
<wv2:WebView2 Name="webView" />
</Grid>
</GroupBox>
<Grid x:Name="diqiu" Height="600" Width="950" Margin="0,10,0,20" > <Image Style="{DynamicResource imagezhu}"></Image> <Image Style="{DynamicResource image中1}" Margin="0,400,0,0"></Image> <GroupBox Margin="600,100,0,500" Header="{Binding ViewData.FailuresCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="累计故障数" Content="次" Width="100"/> <GroupBox Margin="600,400,0,0" Header="0" Style="{DynamicResource GroupStyle圆形}" Tag="故障次数" Content="次" Width="160"/> <GroupBox Margin="-500,100,0,0" Header="{Binding OrderCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="日总接待人数" Content="人" Width="160"/> </Grid>
<Grid x:Name="diqiu" Height="600" Width="950" Margin="0,10,0,20" > <Image Style="{DynamicResource imagezhu}"></Image> <Image Style="{DynamicResource image中1}" Margin="0,400,0,0"></Image> <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{Binding CurrentTime, StringFormat={}{0:HH:mm:ss}}" d:Text="10:53:22" FontSize="70" Margin="5"/>
<TextBlock Text="{Binding CurrentTime, StringFormat={}{0:yyyy-MM-dd}}" d:Text="20239-11-09" FontSize="35" Margin="5"/>
</StackPanel> <GroupBox Margin="600,100,0,500" Header="{Binding ViewData.FailuresCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="累计故障数" Content="次" Width="100"/> <GroupBox Margin="600,400,0,0" Header="0" Style="{DynamicResource GroupStyle圆形}" Tag="故障次数" Content="次" Width="160"/> <GroupBox Margin="-500,100,0,0" Header="{Binding OrderCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource GroupStyle圆形}" Tag="日总接待人数" Content="人" Width="160"/> </Grid>
<GroupBox Margin="0,0,0,0" Height="340" Width="950" Header="信息通知区域" Style="{DynamicResource from}">
<DataGrid Margin="10,10,10,0" ItemsSource="{Binding ViewData.Alarm,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>


+ 11
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs Прегледај датотеку

@@ -51,6 +51,16 @@ namespace BPASmartClient.ScreenLib
}
}
private int _OrderCount = 0;

private DateTime _CurrentTime = DateTime.Now;
/// <summary>
/// 当前时间
/// </summary>
public DateTime CurrentTime
{
get { return _CurrentTime; }
set { _CurrentTime = value; OnPropertyChanged(); }
}
#endregion

public ScreenSplitMealsControl3ViewModel()
@@ -67,6 +77,7 @@ namespace BPASmartClient.ScreenLib
ViewData = modelMaxWok;
OrderCount = modelMaxWok.SplitMeals_CreditCardCount_5 + modelMaxWok.SplitMeals_CreditCardCount_6;
}
CurrentTime = DateTime.Now;
}));
Thread.Sleep(100);
}), $"{DateTime.Now}_3,线程服务");


+ 6
- 7
BPASmartClient.ScreenSplitMeals/App.xaml Прегледај датотеку

@@ -1,8 +1,7 @@
<Application x:Class="BPASmartClient.ScreenSplitMeals.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenSplitMeals">
<Application.Resources>
</Application.Resources>
<Application
x:Class="BPASmartClient.ScreenSplitMeals.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenSplitMeals">
<Application.Resources />
</Application>

Loading…
Откажи
Сачувај