Commit 59dd3f6d authored by 潘栩锋's avatar 潘栩锋 🚴

添加 吹膜扫描模块

parent 280677ae
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
<RowDefinition Height="auto" /> <RowDefinition Height="auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ScrollViewer CanContentScroll="True" PanningMode="Both" > <ScrollViewer PanningMode="Both" >
<StackPanel Orientation="Vertical" > <StackPanel Orientation="Vertical" >
<Grid DataContext="{Binding DataContext, ElementName=grid_bDetect}"> <Grid DataContext="{Binding DataContext, ElementName=grid_bDetect}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
xmlns:iservice="clr-namespace:FLY.Thick.Blowing.IService;assembly=FLY.Thick.Blowing" xmlns:iservice="clr-namespace:FLY.Thick.Blowing.IService;assembly=FLY.Thick.Blowing"
xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base" xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base"
xmlns:blowing_common="clr-namespace:FLY.Thick.Blowing.Common;assembly=FLY.Thick.Blowing" xmlns:blowing_common="clr-namespace:FLY.Thick.Blowing.Common;assembly=FLY.Thick.Blowing"
xmlns:base_uimodule="clr-namespace:ThickTcpUiInWindow.UIModule;assembly=ThickTcpUiInWindow" xmlns:base_uimodule="clr-namespace:ThickTcpUiInWindow.UIModule;assembly=ThickTcpUiInWindow"
xmlns:misc="clr-namespace:Misc;assembly=MISC" xmlns:misc="clr-namespace:Misc;assembly=MISC"
mc:Ignorable="d" mc:Ignorable="d"
...@@ -25,25 +25,11 @@ ...@@ -25,25 +25,11 @@
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/> <ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<ControlTemplate x:Key="picture_button" TargetType="Button">
<Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="LightGray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<blowing_common:BlowingFixProfileParam x:Key="profile_param" MMode="Bag"/> <blowing_common:BlowingFixProfileParam x:Key="profile_param" MMode="Bag"/>
<base_uimodule:FLYLayout <base_uimodule:FLYLayout
x:Key="flylayout_unittests" x:Key="flylayout_unittests"
DynAreaWidth="250" DynAreaWidth="250"
IsInMenuSelect ="True" IsInMenuSelect ="False"
/> />
</ResourceDictionary> </ResourceDictionary>
</Page.Resources> </Page.Resources>
...@@ -160,7 +146,7 @@ ...@@ -160,7 +146,7 @@
<Setter Property="Margin" Value="5,0"/> <Setter Property="Margin" Value="5,0"/>
</Style> </Style>
</StackPanel.Resources> </StackPanel.Resources>
<Button Click="Border_AD_Click" Template="{StaticResource ResourceKey=picture_button}"> <Button Click="Border_AD_Click" Style="{StaticResource ButtonStyle_empty}">
<Border Style="{StaticResource BorderStyle_module}" Name="Border_AD" > <Border Style="{StaticResource BorderStyle_module}" Name="Border_AD" >
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
...@@ -195,7 +181,7 @@ ...@@ -195,7 +181,7 @@
</Grid> </Grid>
</Border> </Border>
</Button> </Button>
<Button Click="button_profile_click" Template="{StaticResource ResourceKey=picture_button}" d:DataContext="{StaticResource profile_param}"> <Button Click="button_profile_click" Style="{StaticResource ButtonStyle_empty}" d:DataContext="{StaticResource profile_param}">
<Border Style="{StaticResource BorderStyle_module}" Name="Border_Profile"> <Border Style="{StaticResource BorderStyle_module}" Name="Border_Profile">
<StackPanel Margin="2"> <StackPanel Margin="2">
<Grid Margin="2"> <Grid Margin="2">
...@@ -307,7 +293,7 @@ ...@@ -307,7 +293,7 @@
</Border> </Border>
</Button> </Button>
<Button Template="{StaticResource ResourceKey=picture_button}" > <Button Style="{StaticResource ButtonStyle_empty}" >
<Border Style="{StaticResource BorderStyle_module}" Name="Border_Width" > <Border Style="{StaticResource BorderStyle_module}" Name="Border_Width" >
<StackPanel Margin="2"> <StackPanel Margin="2">
<StackPanel Orientation="Horizontal" Margin="2"> <StackPanel Orientation="Horizontal" Margin="2">
...@@ -322,7 +308,7 @@ ...@@ -322,7 +308,7 @@
</Button> </Button>
<Button Name="Border_Blowing" Click="Border_Blowing_Click" Template="{StaticResource ResourceKey=picture_button}" > <Button Name="Border_Blowing" Click="Border_Blowing_Click" Style="{StaticResource ButtonStyle_empty}" >
<StackPanel> <StackPanel>
<Border Style="{StaticResource BorderStyle_module}" Visibility="{Binding EPCType, Converter={StaticResource e2visconv_collapsed}, ConverterParameter={x:Static iservice:RenZiJiaFixEPCType.EPCA10}}"> <Border Style="{StaticResource BorderStyle_module}" Visibility="{Binding EPCType, Converter={StaticResource e2visconv_collapsed}, ConverterParameter={x:Static iservice:RenZiJiaFixEPCType.EPCA10}}">
<StackPanel Margin="2"> <StackPanel Margin="2">
...@@ -421,7 +407,7 @@ ...@@ -421,7 +407,7 @@
</Border> </Border>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="Border_IO_Click" Template="{StaticResource ResourceKey=picture_button}" > <Button Click="Border_IO_Click" Style="{StaticResource ButtonStyle_empty}" >
<Border Style="{StaticResource BorderStyle_module}" Name="Border_IO"> <Border Style="{StaticResource BorderStyle_module}" Name="Border_IO">
<StackPanel Margin="2"> <StackPanel Margin="2">
...@@ -459,7 +445,7 @@ ...@@ -459,7 +445,7 @@
</StackPanel> </StackPanel>
</Border> </Border>
</Button> </Button>
<Button Click="Border_FlyAD_Click" Template="{StaticResource ResourceKey=picture_button}" > <Button Click="Border_FlyAD_Click" Style="{StaticResource ButtonStyle_empty}">
<Border Style="{StaticResource BorderStyle_module}" Name="Border_Connected"> <Border Style="{StaticResource BorderStyle_module}" Name="Border_Connected">
<Border.Resources> <Border.Resources>
<ResourceDictionary> <ResourceDictionary>
......
...@@ -28,7 +28,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -28,7 +28,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
/// <summary> /// <summary>
/// Page_Main.xaml 的交互逻辑 /// Page_Main.xaml 的交互逻辑
/// </summary> /// </summary>
public partial class Page_Main : Page, INotifyPropertyChanged public partial class Page_Main : Page
{ {
private ThickTcpUiInWindow.UIModule.FLYLayout mLayout; private ThickTcpUiInWindow.UIModule.FLYLayout mLayout;
private FLYLayoutManager mManager; private FLYLayoutManager mManager;
...@@ -244,13 +244,6 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -244,13 +244,6 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
} }
protected void NotifyPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
} }
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="MathNet.Numerics"> <Reference Include="MathNet.Numerics, Version=4.8.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\dll\MathNet.Numerics.dll</HintPath> <HintPath>..\..\packages\MathNet.Numerics.4.8.1\lib\net461\MathNet.Numerics.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
......
...@@ -206,7 +206,7 @@ namespace FLY.Thick.Blowing.Server ...@@ -206,7 +206,7 @@ namespace FLY.Thick.Blowing.Server
/// <summary> /// <summary>
/// 转向信号列表 /// 转向信号列表
/// </summary> /// </summary>
RList<LimitCell> mLimitList; public RList<LimitCell> mLimitList;
/// <summary> /// <summary>
/// 与mLimitList 一样!! /// 与mLimitList 一样!!
...@@ -2084,33 +2084,33 @@ namespace FLY.Thick.Blowing.Server ...@@ -2084,33 +2084,33 @@ namespace FLY.Thick.Blowing.Server
public delegate void ClearEventHandler(object sender); public delegate void ClearEventHandler(object sender);
public event ClearEventHandler ClearEvent; public event ClearEventHandler ClearEvent;
public BlowingDetect Clone() //public BlowingDetect Clone()
{ //{
BlowingDetect rdetect = new BlowingDetect(); // BlowingDetect rdetect = new BlowingDetect();
rdetect.mDefaultTime = mDefaultTime; // rdetect.mDefaultTime = mDefaultTime;
foreach (RollCell r in mRollList) // foreach (RollCell r in mRollList)
{ // {
rdetect.mRollList.Add(r.Clone()); // rdetect.mRollList.Add(r.Clone());
} // }
foreach (LimitCell l in mLimitList) // foreach (LimitCell l in mLimitList)
{ // {
rdetect.mLimitList.Add(l.Clone()); // rdetect.mLimitList.Add(l.Clone());
} // }
rdetect.RAngle = RAngle; // rdetect.RAngle = RAngle;
rdetect.RollPerimeter = RollPerimeter; // rdetect.RollPerimeter = RollPerimeter;
rdetect.RenZiJiaPeriod = RenZiJiaPeriod; // rdetect.RenZiJiaPeriod = RenZiJiaPeriod;
rdetect.FilmLength = FilmLength; // rdetect.FilmLength = FilmLength;
rdetect.RotationCnt = RotationCnt; // rdetect.RotationCnt = RotationCnt;
//多余 // //多余
rdetect.DefaultRPeriod = DefaultRPeriod; // rdetect.DefaultRPeriod = DefaultRPeriod;
rdetect.IsSign0Double = IsSign0Double; // rdetect.IsSign0Double = IsSign0Double;
rdetect.IsSign1Double = IsSign1Double; // rdetect.IsSign1Double = IsSign1Double;
rdetect.SignType = SignType; // rdetect.SignType = SignType;
return rdetect; // return rdetect;
} //}
/// <summary> /// <summary>
/// 释放资源 /// 释放资源
/// </summary> /// </summary>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Fody" version="4.2.1" targetFramework="net461" developmentDependency="true" /> <package id="Fody" version="4.2.1" targetFramework="net461" developmentDependency="true" />
<package id="MathNet.Numerics" version="4.8.1" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" /> <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" />
<package id="PropertyChanged.Fody" version="2.6.1" targetFramework="net461" /> <package id="PropertyChanged.Fody" version="2.6.1" targetFramework="net461" />
</packages> </packages>
\ No newline at end of file
<Application x:Class="FLY.Thick.BlowingScan.UI.Scan.Client.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml" >
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Culture/StringResource.en-US.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Culture/StringResource.zh-CN.xaml"/>
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />-->
<ResourceDictionary Source="Culture/StringResource.en-US.xaml"/>
<ResourceDictionary Source="Culture/StringResource.zh-CN.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.Diagnostics;
namespace FLY.Thick.BlowingScan.UI.Scan.Client
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
FLY.AppHelper.AppJustOne appjustone;
public App()
{
appjustone = new AppHelper.AppJustOne(this);
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{
string err = e.ExceptionObject.ToString();
Misc.Log.LogMessage("App", 0, err);
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家",
MessageBoxButton.OK, MessageBoxImage.Error);
};
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="strScanGraph2">Scan Graph-Comp</sys:String>
<sys:String x:Key="strScanGraphCircular">Scan Graph-Circular</sys:String>
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="strScanGraph2">对比扫描图</sys:String>
<sys:String x:Key="strScanGraphCircular">环形扫描图</sys:String>
</ResourceDictionary>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
<Costura />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
<NavigationWindow x:Class="FLY.Thick.BlowingScan.UI.Client.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FLY.Thick.BlowingScan.UI.Client"
Title="中国塑控 China Plastic Control"
WindowState="Maximized" Icon="123.ico"
Height="768" Width="1024" ShowsNavigationUI="False" Loaded="NavigationWindow_Loaded">
<NavigationWindow.CommandBindings>
<CommandBinding Command="local:GageCommands.Scan" Executed="CommandBindingScan_Executed"/>
<CommandBinding Command="local:GageCommands.Stop" Executed="CommandBindingStop_Executed"/>
<CommandBinding Command="local:GageCommands.Forward" Executed="CommandBindingForw_Executed"/>
<CommandBinding Command="local:GageCommands.Backward" Executed="CommandBindingBackw_Executed"/>
<CommandBinding Command="local:GageCommands.Org" Executed="CommandBindingOrg_Executed"/>
</NavigationWindow.CommandBindings>
</NavigationWindow>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
using FLY.Thick.Base.Common;
using ThickTcpUiInWindow;
using ThickTcpUiInWindow.Converter;
namespace FLY.Thick.BlowingScan.UI.Client
{
/// <summary>
/// Page_Custom.xaml 的交互逻辑
/// </summary>
public partial class Page_Custom : Page
{
SysParam msysparam;
TDGage gage;
public Page_Custom()
{
InitializeComponent();
}
public void Init(TDGage gage)
{
this.gage = gage;
msysparam = gage.mSysParam as SysParam;
}
private void Page_Loaded(object sender, RoutedEventArgs e)
{
this.DataContext = msysparam;
}
private void button_play_Click(object sender, RoutedEventArgs e)
{
//报警!!!!!!!!
FLY.ControlLibrary.Window_WarningTip.Show(
"测试",
msysparam.WarningTipPath+" duration=5s",
TimeSpan.FromSeconds(5),
msysparam.WarningTipPath);
}
private void button_open_Click(object sender, RoutedEventArgs e)
{
System.Windows.Forms.FileDialog open = new System.Windows.Forms.OpenFileDialog();
open.Filter = "mp3文件|*.mp3|wav文件|*.wav|所有文件|*.*";
open.Title = "打开音乐文件";
if (System.IO.Path.IsPathRooted(msysparam.WarningTipPath))
open.InitialDirectory = System.IO.Path.GetDirectoryName(msysparam.WarningTipPath);
else
open.InitialDirectory = System.Environment.CurrentDirectory;
if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
if (open.FileName.StartsWith(System.Environment.CurrentDirectory))
{
msysparam.WarningTipPath = open.FileName.Substring(System.Environment.CurrentDirectory.Length + 1);
}
else
{
msysparam.WarningTipPath = open.FileName;
}
}
}
private void button_bulkdata_Click(object sender, RoutedEventArgs e)
{
gage.mBulkDataClient.Clear();
}
private void button_apply_Click(object sender, RoutedEventArgs e)
{
msysparam.Save();
gage.Init2();
FLY.ControlLibrary.Window_Tip.Show("成功", "保存成功!!",
TimeSpan.FromSeconds(2));
return;
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
\ No newline at end of file
<UserControl x:Class="FLY.Thick.BlowingScan.UI.Client.UIModule.ScanGraph2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ControlLibrary="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<ControlLibrary:GraphScan2 x:Name="graphscan"/>
</Grid>
</UserControl>
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
This diff is collapsed.
This diff is collapsed.
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