Commit e783d927 authored by 潘栩锋's avatar 潘栩锋 🚴

添加 扫描测厚仪服务器添加线速度信号调试界面

parent e9a3f262
......@@ -63,6 +63,9 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="WdBlowingDetect.xaml.cs">
<DependentUpon>WdBlowingDetect.xaml</DependentUpon>
</Compile>
<Compile Include="WdSetup.xaml.cs">
<DependentUpon>WdSetup.xaml</DependentUpon>
</Compile>
......@@ -98,6 +101,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="WdBlowingDetect.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="WdSetup.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......
......@@ -20,6 +20,8 @@
Content="设置" Command="{Binding SetupCmd}"/>
<Button Style="{StaticResource Styles.Button.Square.Accent2}"
Content="保存调试数据" Command="{Binding SaveDebugCmd}" Width="auto"/>
<Button Style="{StaticResource Styles.Button.Square.Accent2}"
Content="调试" Command="{Binding DebugCmd}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}" >
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding SysParam}">
......
......@@ -45,11 +45,13 @@ namespace FLY.Thick.BlowingScan.UI.Server
public RelayCommand SetupCmd { get; private set; }
public RelayCommand SaveDebugCmd { get; private set; }
public RelayCommand DebugCmd { get; private set; }
TDGage mGage;
public PgMainVm()
{
SetupCmd = new RelayCommand(Setup);
SaveDebugCmd = new RelayCommand(SaveDebug);
DebugCmd = new RelayCommand(OpenWdDebug);
}
......@@ -61,6 +63,12 @@ namespace FLY.Thick.BlowingScan.UI.Server
FlyAd = mGage.flyAd;
}
private void OpenWdDebug()
{
WdBlowingDetect w = new WdBlowingDetect();
w.Init(mGage.gmRenZiJiaScan.mPDetect);
w.ShowDialog();
}
private void Setup()
{
//打开设置页面
......
<Window x:Class="FLY.Thick.BlowingScan.UI.Server.WdBlowingDetect"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:FLY.Thick.BlowingScan.UI.Server"
mc:Ignorable="d"
Title="WdBlowingDetect" MinHeight="450" MinWidth="400" SizeToContent="WidthAndHeight" >
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<GroupBox Header="辊信号">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<Button Style="{StaticResource Styles.Button.Square.Accent2}"
Content="获取" Click="btnGetListClick"/>
</StackPanel>
<ListBox Grid.Row="1" x:Name="lb"/>
</Grid>
</GroupBox>
</Grid>
</Window>
using FLY.Thick.Blowing.IService;
using FLY.Thick.Blowing.Server;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
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 FLY.Thick.BlowingScan.UI.Server
{
/// <summary>
/// WdBlowingDetect.xaml 的交互逻辑
/// </summary>
public partial class WdBlowingDetect : Window
{
BlowingDetect blowingDetect;
ObservableCollection<RollCell2> RollList = new ObservableCollection<RollCell2>();
public WdBlowingDetect()
{
InitializeComponent();
this.lb.ItemsSource = RollList;
}
public void Init(BlowingDetect blowingDetect)
{
this.blowingDetect = blowingDetect;
}
private void btnGetListClick(object sender, RoutedEventArgs e)
{
var rollCells = blowingDetect.mRollList.ToList();
RollList.Clear();
//只要最新的100个
RollList.Clear();
for (int i = 0; i < 100 && i < rollCells.Count(); i++)
{
RollList.Add(rollCells[rollCells.Count() - 1 - i]);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment