添加项目文件。
This commit is contained in:
commit
faa4bbf20d
|
|
@ -0,0 +1,63 @@
|
|||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Oo]ut/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Commands
|
||||
{
|
||||
public class UICommand : ICommand
|
||||
{
|
||||
private readonly Action<object> _execute;
|
||||
private readonly Func<object, bool> _canExecute;
|
||||
public event EventHandler CanExecuteChanged;
|
||||
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
return _canExecute != null || _canExecute(parameter);
|
||||
}
|
||||
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_execute.Invoke(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,407 @@
|
|||
<Window
|
||||
x:Class="Sinvo.EplanHpD.Plugin.WPFUI.MainWindow"
|
||||
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:util="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.Utils"
|
||||
xmlns:viewmodel="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.ViewModel"
|
||||
Title="线材资料检查"
|
||||
Width="1600"
|
||||
Height="800"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:MainViewModel}"
|
||||
Loaded="Window_Loaded"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<Style x:Key="DefaultDataGridRowStyle" TargetType="DataGridRow">
|
||||
<Setter Property="Padding" Value="5" />
|
||||
<Setter Property="MinHeight" Value="25" />
|
||||
</Style>
|
||||
<Style x:Key="DefaultDataGridCellStyle" TargetType="DataGridCell">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="MinHeight" Value="25" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Padding" Value="2,0,0,0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="BorderThickness" Value="1,0,0,0" />
|
||||
<Setter Property="BorderBrush" Value="#aa424242" />
|
||||
<Setter Property="Padding" Value="2,0,0,0" />
|
||||
</Style>
|
||||
<Style TargetType="TabControl">
|
||||
<Setter Property="VerticalContentAlignment" Value="Bottom" />
|
||||
</Style>
|
||||
<Style TargetType="TabItem">
|
||||
<Setter Property="Background" Value="#33424242" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TabItem">
|
||||
<Border
|
||||
Padding="5"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="#66424242"
|
||||
BorderThickness="1,1,1,0"
|
||||
CornerRadius="5,5,0,0">
|
||||
<TextBlock
|
||||
x:Name="txt"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{TemplateBinding Header}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
ToolTip="{TemplateBinding Header}"
|
||||
Visibility="Visible" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="False">
|
||||
<Setter Property="Background" Value="#33424242" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<util:FlagEnumConverter x:Key="FlagEnumConverter" />
|
||||
<DataTemplate x:Key="LoadingMask">
|
||||
<Grid Background="#66424242">
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Vertical">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="16"
|
||||
Text="加载中..." />
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="105" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ContentPresenter
|
||||
x:Name="LoadingMask"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Panel.ZIndex="99"
|
||||
Content="{Binding}"
|
||||
ContentTemplate="{StaticResource LoadingMask}" />
|
||||
<GroupBox Grid.Row="0" Header="操作">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<GroupBox MinWidth="200" Header="项目信息">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel
|
||||
Margin="5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="项目号:" />
|
||||
<TextBox MinWidth="100" Text="{Binding ProjectNo}" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="5,0,0,0" Orientation="Vertical">
|
||||
<CheckBox Content="是否全部CE认证" IsChecked="{Binding IsRequireCe}" />
|
||||
<CheckBox Content="是否使用变色套" IsChecked="{Binding IsUseDiscoloration}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox MinWidth="200" Header="机构信息">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel
|
||||
Margin="5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Width="60" Text="机构号:" />
|
||||
<TextBox MinWidth="100" Text="{Binding MechanismNo}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Margin="5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Width="60" Text="机构名称:" />
|
||||
<TextBox MinWidth="100" Text="{Binding MechanismName}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<Button
|
||||
Height="40"
|
||||
Margin="10"
|
||||
Padding="10"
|
||||
Click="Button_Click"
|
||||
Content="检查"
|
||||
FontSize="14" />
|
||||
<Button
|
||||
x:Name="GenTemplateBtn"
|
||||
Height="40"
|
||||
Margin="10"
|
||||
Padding="10"
|
||||
Click="GenTemplateBtn_Click"
|
||||
Content="生成导入模板数据"
|
||||
FontSize="14" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<TabControl x:Name="DataTabControl" Grid.Row="1">
|
||||
<TabItem Header="报表数据">
|
||||
<DataGrid
|
||||
x:Name="OriginialDataGrid"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding Data}">
|
||||
<DataGrid.Resources>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridRowStyle}" TargetType="DataGridRow" />
|
||||
<Style BasedOn="{StaticResource DefaultDataGridCellStyle}" TargetType="DataGridCell" />
|
||||
</DataGrid.Resources>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
<TabItem Header="型号生成" IsSelected="True">
|
||||
<DataGrid
|
||||
x:Name="ModelGenDataGrid"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
CanUserDeleteRows="False"
|
||||
ClipboardCopyMode="IncludeHeader"
|
||||
ItemsSource="{Binding StuffedData}"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
SelectionUnit="FullRow"
|
||||
SnapsToDevicePixels="True"
|
||||
VirtualizingPanel.IsVirtualizing="False"
|
||||
VirtualizingPanel.ScrollUnit="Pixel">
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Click="IgnoreSelectedError_Click" Header="忽略选中项的异常" />
|
||||
<MenuItem
|
||||
Click="Copy_Click"
|
||||
Header="复制导线名称"
|
||||
Tag="WireName" />
|
||||
<MenuItem Header="复制">
|
||||
<MenuItem
|
||||
Click="Copy_Click"
|
||||
Header="复制料号与异常信息"
|
||||
Tag="MNoAndErrMsg" />
|
||||
<MenuItem
|
||||
Click="Copy_Click"
|
||||
Header="单独复制料号"
|
||||
Tag="MNo" />
|
||||
<MenuItem
|
||||
Click="Copy_Click"
|
||||
Header="单独复制异常信息"
|
||||
Tag="ErrMsg" />
|
||||
</MenuItem>
|
||||
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.Resources>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridRowStyle}" TargetType="DataGridRow">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsError}" Value="true">
|
||||
<Setter Property="Background" Value="#dc4d41" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsError}" Value="false" />
|
||||
<Condition Binding="{Binding IsChecked}" Value="true" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" Value="#18a05d" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridCellStyle}" TargetType="DataGridCell" />
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding WireName}"
|
||||
Header="导线名称"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding WireColor}"
|
||||
Header="线色"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding WireModel}"
|
||||
Header="线材型号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding WireCode}"
|
||||
Header="线材编码"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding FrontTerminalModel}"
|
||||
Header="前端子型号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding FrontTerminalMaterialCode}"
|
||||
Header="前端子物料编码"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding FrontStripLength}"
|
||||
Header="前端剥线长度"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding RearTerminalModel}"
|
||||
Header="后端子型号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding RearTerminalMaterialCode}"
|
||||
Header="后端子物料编码"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding RearStripLength}"
|
||||
Header="后端剥线长度"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding CrossSection}"
|
||||
Header="截面积"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding WireLength}"
|
||||
Header="线长"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding WireNumber}"
|
||||
Header="线号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding Model}"
|
||||
Header="型号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding Quantity}"
|
||||
Header="数量"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding DiscolorationDesc}"
|
||||
Header="变色套型号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding Insulation.MaterialCode}"
|
||||
Header="变色套料号"
|
||||
IsReadOnly="True" />
|
||||
|
||||
<DataGridCheckBoxColumn Header="忽略异常">
|
||||
<DataGridCheckBoxColumn.ElementStyle>
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Viewbox Height="20">
|
||||
<CheckBox
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
IsChecked="{Binding IsIgnore, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</Viewbox>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</DataGridCheckBoxColumn.ElementStyle>
|
||||
</DataGridCheckBoxColumn>
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding CheckedMsg}"
|
||||
Header="检查信息"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding ErrorCount}"
|
||||
Header="异常数"
|
||||
IsReadOnly="True" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
|
||||
|
||||
<TabItem Header="导入模板预览">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button
|
||||
Grid.Row="0"
|
||||
Height="30"
|
||||
Margin="5"
|
||||
Click="ExportDataBtn_Click"
|
||||
Content="导出下单数据" />
|
||||
<DataGrid
|
||||
x:Name="ImportDataGrid"
|
||||
Grid.Row="1"
|
||||
AlternatingRowBackground="#f5f5f5"
|
||||
AlternationCount="2"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding ExportData}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding SeqNo}" Header="清单序号" />
|
||||
<DataGridTextColumn Binding="{Binding MechanismNo}" Header="机构代号" />
|
||||
<DataGridTextColumn Binding="{Binding MechanismName}" Header="机构名称" />
|
||||
<DataGridTextColumn Binding="{Binding DrawNo}" Header="图号" />
|
||||
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编码" />
|
||||
<DataGridTextColumn Binding="{Binding WireOrTubeSpec}" Header="气管规格" />
|
||||
<DataGridTextColumn Binding="{Binding WireOrTubeMaterialNo}" Header="线材/气管物料编号" />
|
||||
<DataGridTextColumn Binding="{Binding WireOrTubeLength}" Header="线材/气管长度" />
|
||||
<DataGridTextColumn Binding="{Binding NumberTubeSpec}" Header="号码管规格" />
|
||||
<DataGridTextColumn Binding="{Binding NumberTubeMaterialNo}" Header="号码管物料编码" />
|
||||
<DataGridTextColumn Binding="{Binding NumberTubeContent}" Header="号码管内容" />
|
||||
<DataGridTextColumn Binding="{Binding FrontTerminalModel}" Header="前端子型号" />
|
||||
<DataGridTextColumn Binding="{Binding FrontTerminalMaterialNo}" Header="前端子物料编码" />
|
||||
<DataGridTextColumn Binding="{Binding FrontTerminalStripLength}" Header="前端子剥线长度" />
|
||||
<DataGridTextColumn Binding="{Binding RearTerminalModel}" Header="后端子型号" />
|
||||
<DataGridTextColumn Binding="{Binding RearTerminalMaterialNo}" Header="后端子物料编码" />
|
||||
<DataGridTextColumn Binding="{Binding RearTerminalStripLength}" Header="后端子剥线长度" />
|
||||
<DataGridTextColumn Binding="{Binding InsulationModel}" Header="绝缘软套型号" />
|
||||
<DataGridTextColumn Binding="{Binding InsulationMaterialNo}" Header="绝缘软套型号物料编码" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Height="28"
|
||||
VerticalAlignment="Top"
|
||||
Header="检查配置项">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<GroupBox Header="变色套检查标识">
|
||||
<StackPanel>
|
||||
<RadioButton
|
||||
Content="L1/L2/L3/PE"
|
||||
GroupName="Insulation"
|
||||
IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static util:WireFlagType.Dual}}" />
|
||||
<RadioButton
|
||||
Content="R/S/T/PE"
|
||||
GroupName="Insulation"
|
||||
IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static util:WireFlagType.Single}}" />
|
||||
<RadioButton
|
||||
Content="L1/R/L2/S/L3/T/PE"
|
||||
GroupName="Insulation"
|
||||
IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static util:WireFlagType.Mix}}" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
using EPLAN.Harness.Common;
|
||||
using EPLAN.Harness.Common.Extensions;
|
||||
using EPLAN.Harness.Common.LrsSystem;
|
||||
using EPLAN.Harness.Core.Controls;
|
||||
using EPLAN.Harness.Core.Settings;
|
||||
using EPLAN.Harness.IO;
|
||||
using EPLAN.Harness.ProjectCore.Report;
|
||||
using Microsoft.Win32;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Utils;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI;
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private readonly MainViewModel ViewModel;
|
||||
public delegate void UpdateDataGridColumns(List<DataGridColumn> columns, DataGridType type);
|
||||
private IEnumerable<BaseReportEntry> datas;
|
||||
private List<ReportColumn> reportColumns;
|
||||
public MainWindow(IEnumerable<BaseReportEntry> datas, List<ReportColumn> columns)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = ViewModel = new MainViewModel();
|
||||
ViewModel.UpdateDataGridColumns = UpdateDataGridColumnsByType;
|
||||
this.datas = datas;
|
||||
this.reportColumns = columns;
|
||||
ViewModel.DataColumns = [];
|
||||
ViewModel.Data = [];
|
||||
ViewModel.StuffedData = [];
|
||||
ViewModel.ExportData = [];
|
||||
}
|
||||
|
||||
public void UpdateDataGridColumnsByType(List<DataGridColumn> columns, DataGridType type)
|
||||
{
|
||||
try
|
||||
{
|
||||
//this.Dispatcher.BeginInvoke(delegate ()
|
||||
//{
|
||||
switch (type)
|
||||
{
|
||||
case DataGridType.Originial:
|
||||
UpdateOriginialDataGridColumns(columns);
|
||||
break;
|
||||
case DataGridType.Import:
|
||||
UpdateImportDataGridColumns(columns);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//});
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
FlexMessageBox.Error($"{ex}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void UpdateOriginialDataGridColumns(List<DataGridColumn> columns)
|
||||
{
|
||||
OriginialDataGrid.Columns.Clear();
|
||||
//var columns = ViewModel.DataColumns;
|
||||
foreach (var column in columns)
|
||||
{
|
||||
OriginialDataGrid.Columns.Add(column);
|
||||
}
|
||||
}
|
||||
public void UpdateImportDataGridColumns(List<DataGridColumn> columns)
|
||||
{
|
||||
ImportDataGrid.Columns.Clear();
|
||||
//var columns = ViewModel.DataColumns;
|
||||
foreach (var column in columns)
|
||||
{
|
||||
ImportDataGrid.Columns.Add(column);
|
||||
}
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DataTabControl.SelectedIndex = 1;
|
||||
LoadingMask.Visibility = Visibility.Visible;
|
||||
try
|
||||
{
|
||||
ViewModel.CheckAll();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Trace.WriteLine(ex.ToString());
|
||||
}
|
||||
LoadingMask.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
//private void GetDataBtn_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var result = ExcelHelper.GetWireTerminalMappingTable();
|
||||
|
||||
//}
|
||||
|
||||
private void GenTemplateBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTabControl.SelectedIndex = 2;
|
||||
ViewModel.GenExportData();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
FlexMessageBox.Error($"{ex}");
|
||||
}
|
||||
}
|
||||
|
||||
private async void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
LoadingMask.Visibility = Visibility.Visible;
|
||||
await LoadDataAsync(datas, reportColumns);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
FlexMessageBox.Error($"{ex}");
|
||||
}
|
||||
|
||||
}
|
||||
public async Task LoadDataAsync(IEnumerable<BaseReportEntry> reportData, List<ReportColumn> columns)
|
||||
{
|
||||
|
||||
var dataColumns = ViewModel.GetColumns(columns);
|
||||
|
||||
|
||||
var data = ViewModel.LoadReportDataAsync(reportData, columns);
|
||||
|
||||
Task.WaitAll(dataColumns, data);
|
||||
var stuffedData = ViewModel.StuffData(data.Result);
|
||||
|
||||
stuffedData.ContinueWith(x =>
|
||||
{
|
||||
_ = this.Dispatcher.BeginInvoke(delegate ()
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewModel.DataColumns?.Clear();
|
||||
dataColumns.Result.Where(it => it != null).ForEach(ViewModel.DataColumns.Add);
|
||||
ViewModel.Data?.Clear();
|
||||
data.Result.Where(it => it != null).ForEach(ViewModel.Data.Add);
|
||||
ViewModel.StuffedData?.Clear();
|
||||
stuffedData.Result.Where(it => it != null).ForEach(ViewModel.StuffedData.Add);
|
||||
UpdateDataGridColumnsByType([.. ViewModel.DataColumns], DataGridType.Originial);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Trace.WriteLine($"{ex}");
|
||||
}
|
||||
LoadingMask.Visibility = Visibility.Collapsed;
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
private void ExportDataBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (ViewModel.ExportData == null || ViewModel.ExportData.Count <= 0)
|
||||
{
|
||||
FlexMessageBox.Info($"无数据可导出!");
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog
|
||||
{
|
||||
Filter = Singleton<LRS>.Instance["Report_ExpFilter", "Report_ExpFilter"],
|
||||
FilterIndex = StudioSettings.Instance.ReportExport_FilterIndex,
|
||||
FileName = $"单芯线下单{DateTime.Now:yyyy_MM_dd}.xlsx",
|
||||
AddExtension = true,
|
||||
InitialDirectory = StudioSettings.Instance.ReportExport_Path,
|
||||
CheckPathExists = true
|
||||
};
|
||||
if (saveFileDialog.ShowDialog() == true)
|
||||
{
|
||||
ExcelHelper.SaveByTemplate(ViewModel.ExportData, Path.Combine(FlexIOBase.GetParentPath(saveFileDialog.FileName), saveFileDialog.FileName));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
FlexMessageBox.Error($"{ex}");
|
||||
}
|
||||
}
|
||||
|
||||
private void IgnoreSelectedError_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ModelGenDataGrid.SelectedItems != null)
|
||||
{
|
||||
var selectedRows = ModelGenDataGrid.SelectedItems;
|
||||
foreach (var item in selectedRows)
|
||||
{
|
||||
if (item is StuffedDataModel model)
|
||||
{
|
||||
model.IsIgnore = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Copy_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is MenuItem item)
|
||||
{
|
||||
var selectItems = ModelGenDataGrid.SelectedItems;
|
||||
if (item.Tag?.ToString() == "MNo")
|
||||
{
|
||||
var str = string.Join("\n", selectItems.Cast<StuffedDataModel>().Select(item => item.WireCode));
|
||||
Clipboard.SetText(str);
|
||||
}
|
||||
if (item.Tag?.ToString() == "ErrMsg")
|
||||
{
|
||||
var str = string.Join("\n", selectItems.Cast<StuffedDataModel>().Select(item => item.CheckedMsg));
|
||||
Clipboard.SetText(str);
|
||||
}
|
||||
if (item.Tag?.ToString() == "MNoAndErrMsg")
|
||||
{
|
||||
var str = string.Join("\n", selectItems.Cast<StuffedDataModel>().Select(item => $"{item.WireCode}\t{item.CheckedMsg}"));
|
||||
Clipboard.SetText(str);
|
||||
}
|
||||
if (item.Tag?.ToString() == "WireName")
|
||||
{
|
||||
var str = string.Join("\n", selectItems.Cast<StuffedDataModel>().Select(item => $"{item.WireName}"));
|
||||
Clipboard.SetText(str);
|
||||
}
|
||||
}
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||
{
|
||||
public class CheckedModel : INotifyPropertyChanged
|
||||
{
|
||||
private bool isChecked = false;
|
||||
private bool isError = false;
|
||||
private int errorCount = 0;
|
||||
private string checkedMsg;
|
||||
private bool isIgnore = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否已检查
|
||||
/// </summary>
|
||||
public bool IsChecked
|
||||
{
|
||||
get => isChecked;
|
||||
set => SetProperty(ref isChecked, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在异常
|
||||
/// </summary>
|
||||
public bool IsError
|
||||
{
|
||||
get => isError;
|
||||
set => SetProperty(ref isError, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 异常数
|
||||
/// </summary>
|
||||
public int ErrorCount
|
||||
{
|
||||
get => errorCount;
|
||||
set => SetProperty(ref errorCount, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查信息
|
||||
/// </summary>
|
||||
public string CheckedMsg
|
||||
{
|
||||
get => checkedMsg;
|
||||
set => SetProperty(ref checkedMsg, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否忽略
|
||||
/// </summary>
|
||||
public bool IsIgnore
|
||||
{
|
||||
get => isIgnore;
|
||||
set => SetProperty(ref isIgnore, value);
|
||||
}
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
protected bool SetProperty<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
|
||||
{
|
||||
if (Equals(field, value)) return false;
|
||||
field = value;
|
||||
OnPropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
using MiniExcelLibs.Attributes;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||
{
|
||||
/*序号 规格型号 线材型号规格 线材物料编码 号码管/热缩管型号 号码管物料编码 扁形端子 扁形端子物料编码 O型端子 O型端子物料编码 针型端子 针型端子物料编码 Y形端子 Y形端子物料编码*/
|
||||
public class ExcelModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "序号")]
|
||||
public int SerialNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "规格型号")]
|
||||
public string SpecificationModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线材型号规格
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "线材型号规格")]
|
||||
public string WireModelSpecification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线材物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "线材物料编码")]
|
||||
public string WireMaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 号码管/热缩管型号
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "号码管/热缩管型号")]
|
||||
public string TubeModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 号码管物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "号码管物料编码")]
|
||||
public string TubeMaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扁形端子
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "扁形端子")]
|
||||
public string FlatTerminal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扁形端子物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "扁形端子物料编码")]
|
||||
public string FlatTerminalMaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// O型端子
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "O型端子")]
|
||||
public string OTypeTerminal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// O型端子物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "O型端子物料编码")]
|
||||
public string OTypeTerminalMaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 针型端子
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "针型端子")]
|
||||
public string PinTerminal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 针型端子物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "针型端子物料编码")]
|
||||
public string PinTerminalMaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Y形端子
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "Y形端子")]
|
||||
public string YTypeTerminal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Y形端子物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "Y形端子物料编码")]
|
||||
public string YTypeTerminalMaterialCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||
{
|
||||
public class ExportModel
|
||||
{
|
||||
/*
|
||||
清单序号 机构代号 机构名称 "图号
|
||||
(规格/型号)" 品名 品牌 物料编码 单台用量 "A
|
||||
线材/气管规格
|
||||
" "A
|
||||
线材/气管数量" "A
|
||||
线材/气管物料编号" "AL
|
||||
线材/气管长度
|
||||
(mm)" "B
|
||||
号码管规格" "B
|
||||
号码管物料编码" "B
|
||||
号码管内容" "B
|
||||
号码管数量×长度(mm)" "BL
|
||||
号码管总长度(mm)" "C
|
||||
前端子型号" "C
|
||||
前端子物料编码" "C
|
||||
前端子数量" "CL
|
||||
前端子剥线长度
|
||||
(mm)" "D
|
||||
后端子型号" "D
|
||||
后端子物料编码" "D
|
||||
后端子数量" "DL
|
||||
后端子剥线长度
|
||||
(mm)" "E
|
||||
绝缘软套型号" "E
|
||||
绝缘软套型号物料编码" "EL
|
||||
绝缘软套数量" 下单原因 "下单类型
|
||||
(增加/减少/原件返修)" 下单日期 交货日期 "工程师工号
|
||||
+姓名" 工单/订单号 技术参数补充
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// 清单序号
|
||||
/// </summary>
|
||||
public string SeqNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机构代号
|
||||
/// </summary>
|
||||
public string MechanismNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机构名称
|
||||
/// </summary>
|
||||
public string MechanismName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图号(规格/型号)
|
||||
/// </summary>
|
||||
public string DrawNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string MaterialCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// /气管规格
|
||||
/// </summary>
|
||||
public string WireOrTubeSpec { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A线材/气管物料编号
|
||||
/// </summary>
|
||||
public string WireOrTubeMaterialNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// AL线材/气管长度(mm)
|
||||
/// </summary>
|
||||
public double WireOrTubeLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// B号码管规格
|
||||
/// </summary>
|
||||
public string NumberTubeSpec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// B号码管物料编码
|
||||
/// </summary>
|
||||
public string NumberTubeMaterialNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// B号码管内容
|
||||
/// </summary>
|
||||
public string NumberTubeContent { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// C前端子型号
|
||||
/// </summary>
|
||||
public string FrontTerminalModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// C前端子物料编码
|
||||
/// </summary>
|
||||
public string FrontTerminalMaterialNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CL前端子剥线长度(mm)
|
||||
/// </summary>
|
||||
public string FrontTerminalStripLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// D后端子型号
|
||||
/// </summary>
|
||||
public string RearTerminalModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// D后端子物料编码
|
||||
/// </summary>
|
||||
public string RearTerminalMaterialNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DL后端子剥线长度(mm)
|
||||
/// </summary>
|
||||
public string RearTerminalStripLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// E绝缘软套型号
|
||||
/// </summary>
|
||||
public string InsulationModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// E绝缘软套型号物料编码
|
||||
/// </summary>
|
||||
public string InsulationMaterialNo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
using MiniExcelLibs.Attributes;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 绝缘软套
|
||||
/// </summary>
|
||||
public class InsulationModel
|
||||
{
|
||||
/*
|
||||
* 物料编码 物料品名 规格 品牌 单位 对应机加件材质 每米/kg 采购交货天数 备注
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "物料编码")]
|
||||
public string MaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料品名
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "物料品名")]
|
||||
public string MaterialName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "规格")]
|
||||
public string Specification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "品牌")]
|
||||
public string Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "单位")]
|
||||
public string Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对应机加件材质
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "对应机加件材质")]
|
||||
public string CorrespondingMaterial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 每米/kg
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "每米/kg")]
|
||||
public string PerMeterOrKg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采购交货天数
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "采购交货天数")]
|
||||
public string DeliveryDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "备注")]
|
||||
public string Remarks { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||
{
|
||||
public class ReportModel : CheckedModel
|
||||
{
|
||||
/// 项目
|
||||
public string Project { get; set; }
|
||||
/// 归属机构
|
||||
public string Document { get; set; }
|
||||
/// 电缆名称
|
||||
public string CableName { get; set; }
|
||||
/// 规格型号
|
||||
public string PartNumber { get; set; }
|
||||
/// 品牌
|
||||
public string ManufacturerCompany { get; set; }
|
||||
/// 电线标码
|
||||
public string Imprint { get; set; }
|
||||
/// 长度(mm)
|
||||
public string Length { get; set; }
|
||||
/// 外径
|
||||
public string OutsideDiameter { get; set; }
|
||||
/// 截面积
|
||||
public string CoreDiameter { get; set; }
|
||||
/// 物料编号
|
||||
public string ERPNr { get; set; }
|
||||
/// 电线颜色
|
||||
public string DisplayColor { get; set; }
|
||||
/// 电线条颜色
|
||||
public string DisplayStripeColor { get; set; }
|
||||
/// <summary>
|
||||
/// 导线名称
|
||||
/// </summary>
|
||||
public string WireName { get; set; }
|
||||
/// 绞线
|
||||
public string WireTwisted { get; set; }
|
||||
/// 前端子型号
|
||||
public string ConnectorFrom { get; set; }
|
||||
/// 前端子物料编码
|
||||
public string ConnectorFromERPNr { get; set; }
|
||||
/// 前端剥线长度
|
||||
public string StripLengthFrom { get; set; }
|
||||
/// 后端子型号
|
||||
public string ConnectorTo { get; set; }
|
||||
/// 后端子物料编码
|
||||
public string ConnectorToERPNr { get; set; }
|
||||
/// 后端剥线长度
|
||||
public string StripLengthTo { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
using System.ComponentModel;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||
{
|
||||
/*
|
||||
线色
|
||||
线材型号
|
||||
线材编码
|
||||
前端子型号
|
||||
前端子物料编码
|
||||
前端剥线长度
|
||||
后端子型号
|
||||
后端子物料编码
|
||||
后端剥线长度
|
||||
截面积
|
||||
线长+0
|
||||
十位取整
|
||||
线号
|
||||
型号
|
||||
数量
|
||||
|
||||
*/
|
||||
public class StuffedDataModel : CheckedModel, INotifyPropertyChanged
|
||||
{
|
||||
public StuffedDataModel()
|
||||
{
|
||||
}
|
||||
|
||||
private string wireColor;
|
||||
private string wireModel;
|
||||
private string wireCode;
|
||||
private string wireName;
|
||||
private string frontTerminalModel;
|
||||
private string frontTerminalMaterialCode;
|
||||
private string frontStripLength;
|
||||
private string rearTerminalModel;
|
||||
private string rearTerminalMaterialCode;
|
||||
private string rearStripLength;
|
||||
private string crossSection;
|
||||
private string wireLength;
|
||||
private string wireNumber;
|
||||
private string model;
|
||||
private int quantity;
|
||||
private string discolorationDesc;
|
||||
|
||||
private string imprint;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导线名称
|
||||
/// </summary>
|
||||
public string WireName
|
||||
{
|
||||
get => wireName;
|
||||
set => SetProperty(ref wireName, value);
|
||||
}
|
||||
/// 电线标码
|
||||
public string Imprint
|
||||
{
|
||||
get => imprint;
|
||||
set => SetProperty(ref imprint, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 线色
|
||||
/// </summary>
|
||||
public string WireColor
|
||||
{
|
||||
get => wireColor;
|
||||
set => SetProperty(ref wireColor, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线材型号
|
||||
/// </summary>
|
||||
public string WireModel
|
||||
{
|
||||
get => wireModel;
|
||||
set => SetProperty(ref wireModel, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线材编码
|
||||
/// </summary>
|
||||
public string WireCode
|
||||
{
|
||||
get => wireCode;
|
||||
set => SetProperty(ref wireCode, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 前端子型号
|
||||
/// </summary>
|
||||
public string FrontTerminalModel
|
||||
{
|
||||
get => frontTerminalModel;
|
||||
set => SetProperty(ref frontTerminalModel, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 前端子物料编码
|
||||
/// </summary>
|
||||
public string FrontTerminalMaterialCode
|
||||
{
|
||||
get => frontTerminalMaterialCode;
|
||||
set => SetProperty(ref frontTerminalMaterialCode, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 前端剥线长度
|
||||
/// </summary>
|
||||
public string FrontStripLength
|
||||
{
|
||||
get => frontStripLength;
|
||||
set => SetProperty(ref frontStripLength, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后端子型号
|
||||
/// </summary>
|
||||
public string RearTerminalModel
|
||||
{
|
||||
get => rearTerminalModel;
|
||||
set => SetProperty(ref rearTerminalModel, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后端子物料编码
|
||||
/// </summary>
|
||||
public string RearTerminalMaterialCode
|
||||
{
|
||||
get => rearTerminalMaterialCode;
|
||||
set => SetProperty(ref rearTerminalMaterialCode, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后端剥线长度
|
||||
/// </summary>
|
||||
public string RearStripLength
|
||||
{
|
||||
get => rearStripLength;
|
||||
set => SetProperty(ref rearStripLength, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 截面积
|
||||
/// </summary>
|
||||
public string CrossSection
|
||||
{
|
||||
get => crossSection;
|
||||
set => SetProperty(ref crossSection, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线长
|
||||
/// </summary>
|
||||
public string WireLength
|
||||
{
|
||||
get => wireLength;
|
||||
set => SetProperty(ref wireLength, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线号
|
||||
/// </summary>
|
||||
public string WireNumber
|
||||
{
|
||||
get => wireNumber;
|
||||
set => SetProperty(ref wireNumber, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 型号
|
||||
/// </summary>
|
||||
public string Model
|
||||
{
|
||||
get => model;
|
||||
set => SetProperty(ref model, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public int Quantity
|
||||
{
|
||||
get => quantity;
|
||||
set => SetProperty(ref quantity, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 变色管信息
|
||||
/// </summary>
|
||||
public string DiscolorationDesc
|
||||
{
|
||||
get => discolorationDesc;
|
||||
set => SetProperty(ref discolorationDesc, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 变色绝缘套管信息
|
||||
/// </summary>
|
||||
public InsulationModel Insulation { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Sinvo.EplanHpD.Plugin.WPFUI")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Sinvo.EplanHpD.Plugin.WPFUI")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//若要开始生成可本地化的应用程序,请设置
|
||||
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
|
||||
//在 <PropertyGroup> 中。例如,如果你使用的是美国英语。
|
||||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
|
||||
//对以下 NeutralResourceLanguage 特性的注释。 更新
|
||||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//或应用程序资源字典中找到时使用)
|
||||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//、应用程序或任何主题专用资源字典中找到时使用)
|
||||
)]
|
||||
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sinvo.EplanHpD.Plugin.WPFUI.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2DBCD22A-650D-4797-9908-9C4D5D6665FE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Sinvo.EplanHpD.Plugin.WPFUI</RootNamespace>
|
||||
<AssemblyName>Sinvo.EplanHpD.Plugin.WPFUI</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="C1.Win.C1FlexGrid.2">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\C1.Win.C1FlexGrid.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.API">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.API.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.AppCore">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.AppCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.Common">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.Core">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.IO">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.IO.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.Primitives">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.Project">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.Project.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.ProjectCore">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.ProjectCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.Report">
|
||||
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\EPLAN.Harness.Report.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Commands\UICommand.cs" />
|
||||
<Compile Include="Models\CheckedModel.cs" />
|
||||
<Compile Include="Models\ExcelModel.cs" />
|
||||
<Compile Include="Models\ExportModel.cs" />
|
||||
<Compile Include="Models\InsulationModel.cs" />
|
||||
<Compile Include="Models\ReportModel.cs" />
|
||||
<Compile Include="Models\StuffedDataModel.cs" />
|
||||
<Compile Include="Utils\Consts.cs" />
|
||||
<Compile Include="Utils\DataGridType.cs" />
|
||||
<Compile Include="Utils\ExcelHelper.cs" />
|
||||
<Compile Include="Utils\FlagEnumConverter.cs" />
|
||||
<Compile Include="Utils\WireFlagType.cs" />
|
||||
<Compile Include="ViewModel\MainViewModel.Check.cs" />
|
||||
<Compile Include="ViewModel\MainViewModel.cs" />
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MiniExcel">
|
||||
<Version>1.34.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="PolySharp">
|
||||
<Version>1.14.1</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||
{
|
||||
internal class Consts
|
||||
{
|
||||
public const string DATA_FILE_PATH = @"\\192.168.1.160\plm系统文档\线材资料检查";
|
||||
/// <summary>
|
||||
/// 线材端子号码管配对表(配CE端子).xlsm
|
||||
/// </summary>
|
||||
public const string DATA_FILE_PATH_WIRE_TERMINAL = @"线材端子号码管配对表(配CE端子).xlsm";
|
||||
/// <summary>
|
||||
/// 绝缘软套
|
||||
/// </summary>
|
||||
public const string DATA_FILE_PATH_INSULATION = @"绝缘软套规格.xlsx";
|
||||
public const string TEMPLATE_FILE_NAME = @"下单模板.xlsx";
|
||||
/// <summary>
|
||||
/// 线径平方规格匹配
|
||||
/// </summary>
|
||||
public static readonly Regex regex = new("RV[\\d]+\\.{0,1}[\\d]+", RegexOptions.Compiled);
|
||||
/// <summary>
|
||||
/// 变色套平方规格匹配
|
||||
/// </summary>
|
||||
public static readonly Regex dRegex = new("V-[\\d]+\\.{0,1}[\\d]+", RegexOptions.Compiled);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||
{
|
||||
public enum DataGridType
|
||||
{
|
||||
Originial,
|
||||
Import
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
using MiniExcelLibs;
|
||||
using MiniExcelLibs.OpenXml;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||
{
|
||||
public class ExcelHelper
|
||||
{
|
||||
private static IEnumerable<ExcelModel> _terminalMappingCache = [];
|
||||
/// <summary>
|
||||
/// 线材端子对照表
|
||||
/// </summary>
|
||||
public static IEnumerable<ExcelModel> GetWireTerminalMappingTable(string wireModel)
|
||||
{
|
||||
CheckAndGetCache();
|
||||
return _terminalMappingCache.Where(item => item.WireModelSpecification == wireModel);
|
||||
}
|
||||
|
||||
private static void CheckAndGetCache()
|
||||
{
|
||||
lock (_terminalMappingCache)
|
||||
{
|
||||
if (_terminalMappingCache == null || !_terminalMappingCache.Any())
|
||||
{
|
||||
GetAllWireTerminalMappingTable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void GetAllWireTerminalMappingTable()
|
||||
{
|
||||
var config = new OpenXmlConfiguration()
|
||||
{
|
||||
FillMergedCells = true
|
||||
};
|
||||
var path = Path.Combine(Consts.DATA_FILE_PATH, Consts.DATA_FILE_PATH_WIRE_TERMINAL);
|
||||
var result = MiniExcel.Query<ExcelModel>(path, configuration: config)
|
||||
//.Where(item => item.WireModelSpecification == wireModel)
|
||||
.ToList();
|
||||
_terminalMappingCache = result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 绝缘软套
|
||||
/// </summary>
|
||||
public static IEnumerable<InsulationModel> GetInsulationSoftSleeveTable(string wireModel)
|
||||
{
|
||||
var path = Path.Combine(Consts.DATA_FILE_PATH, Consts.DATA_FILE_PATH_INSULATION);
|
||||
var results = MiniExcel.Query<InsulationModel>(path);
|
||||
//.Where(item => item.Specification == wireModel)
|
||||
//.ToList();
|
||||
return results.Where(item => item.Specification == wireModel);
|
||||
}
|
||||
|
||||
//public static List<IDictionary<string, object>> GetWireTerminalMappingTable()
|
||||
//{
|
||||
// var config = new OpenXmlConfiguration()
|
||||
// {
|
||||
// FillMergedCells = true
|
||||
// };
|
||||
// return MiniExcel.Query("D:\\Desktop\\123\\线材端子号码管配对表(配CE端子)2024-10-18.xlsm", useHeaderRow: true, configuration: config)
|
||||
// //.Where(item => item.WireModelSpecification == wireModel)
|
||||
// .Cast<IDictionary<string, object>>()
|
||||
// .ToList();
|
||||
//}
|
||||
|
||||
public static string GetNumberTube(string numberTubeSpec)
|
||||
{
|
||||
CheckAndGetCache();
|
||||
return _terminalMappingCache.Where(item => item.TubeModel == numberTubeSpec)
|
||||
.Select(item => item.TubeMaterialCode)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
public static void SaveByTemplate(object data, string newFilePath)
|
||||
{
|
||||
var config = new OpenXmlConfiguration()
|
||||
{
|
||||
IgnoreTemplateParameterMissing = true,
|
||||
};
|
||||
var path = Path.Combine(Consts.DATA_FILE_PATH, Consts.TEMPLATE_FILE_NAME);
|
||||
MiniExcel.SaveAsByTemplate(newFilePath, path, new
|
||||
{
|
||||
items = data
|
||||
}, configuration: config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||
{
|
||||
public class FlagEnumConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var flag = (WireFlagType)value;
|
||||
if (!Enum.IsDefined(typeof(WireFlagType), flag))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return flag == (WireFlagType)parameter;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
if (value is not bool isChecked)
|
||||
{
|
||||
throw new InvalidOperationException("The value must be a bool");
|
||||
}
|
||||
|
||||
return isChecked ? (WireFlagType)parameter : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System.ComponentModel;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||
{
|
||||
public enum WireFlagType
|
||||
{
|
||||
[Description("L1/L2/L3/PE")]
|
||||
Dual,
|
||||
[Description("R/S/T/PE")]
|
||||
Single,
|
||||
[Description("L1/R/L2/S/L3/T/PE")]
|
||||
Mix
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel
|
||||
{
|
||||
public partial class MainViewModel
|
||||
{
|
||||
public void CheckAll()
|
||||
{
|
||||
StuffedData.AsParallel().WithDegreeOfParallelism(4).ForAll(item =>
|
||||
{
|
||||
if (item == null) return;
|
||||
item.IsError = false;
|
||||
item.ErrorCount = 0;
|
||||
item.CheckedMsg = "";
|
||||
|
||||
ValidateItem(item);
|
||||
|
||||
item.IsChecked = true;
|
||||
});
|
||||
|
||||
OnPropertyChanged(nameof(StuffedData));
|
||||
}
|
||||
|
||||
private void ValidateItem(StuffedDataModel item)
|
||||
{
|
||||
CheckRequiredFields(item);
|
||||
if (IsUseDiscoloration)
|
||||
{
|
||||
CheckImprint(item);
|
||||
}
|
||||
if (IsRequireCe)
|
||||
{
|
||||
CheckCeCompliance(item);
|
||||
}
|
||||
CheckInsulation(item);
|
||||
CheckTerminals(item);
|
||||
CheckDuplicateModel(item);
|
||||
}
|
||||
|
||||
private void CheckRequiredFields(StuffedDataModel item)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.RearTerminalMaterialCode))
|
||||
{
|
||||
SetItemError(item, "后端子物料编码为空\r\n");
|
||||
}
|
||||
if (string.IsNullOrEmpty(item.FrontTerminalMaterialCode))
|
||||
{
|
||||
SetItemError(item, "前端子物料编码为空\r\n");
|
||||
}
|
||||
if (string.IsNullOrEmpty(item.WireColor))
|
||||
{
|
||||
SetItemError(item, "线色不符合规范\r\n");
|
||||
}
|
||||
if (string.IsNullOrEmpty(item.WireCode))
|
||||
{
|
||||
SetItemError(item, "线材编码为空\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckCeCompliance(StuffedDataModel item)
|
||||
{
|
||||
if (item.WireModel.IndexOf("-CE", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
{
|
||||
SetItemError(item, "未使用CE认证物料!\r\n");
|
||||
}
|
||||
if (item.FrontTerminalModel.IndexOf("-CE", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
{
|
||||
SetItemError(item, "前端子未使用CE认证端子!\r\n");
|
||||
}
|
||||
if (item.RearTerminalModel.IndexOf("-CE", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
{
|
||||
SetItemError(item, "后端子未使用CE认证端子!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckInsulation(StuffedDataModel item)
|
||||
{
|
||||
if (item.Insulation != null && item.Insulation.Specification != null)
|
||||
{
|
||||
var match = Consts.regex.Match(item.WireModel);
|
||||
if (!string.IsNullOrEmpty(match.Value))
|
||||
{
|
||||
var itemWireDiameter = double.Parse(match.Value.Replace("RV", ""));
|
||||
var insMatch = Consts.dRegex.Match(item.Insulation.Specification);
|
||||
if (!string.IsNullOrEmpty(insMatch.Value))
|
||||
{
|
||||
if (itemWireDiameter < 1.5d)
|
||||
{
|
||||
if (insMatch.Value != "RV1.5")
|
||||
{
|
||||
SetItemError(item, "变色套大小与线径不匹配!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var insDiameter = double.Parse(insMatch.Value.Replace("V-", ""));
|
||||
if (Math.Abs(insDiameter - itemWireDiameter) > 0)
|
||||
{
|
||||
SetItemError(item, "变色套大小与线径不匹配!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetItemError(item, "变色套未匹配到平方数!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetItemError(item, "未匹配到线材平方数!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckTerminals(StuffedDataModel item)
|
||||
{
|
||||
var canUsedTerminals = GetCanUsedTerminal(item.WireModel);
|
||||
if (canUsedTerminals != null && canUsedTerminals.Any())
|
||||
{
|
||||
if (canUsedTerminals.All(it => it != item.FrontTerminalModel))
|
||||
{
|
||||
SetItemError(item, "前端子不在可选列表中!\r\n");
|
||||
}
|
||||
if (canUsedTerminals.All(it => it != item.RearTerminalModel))
|
||||
{
|
||||
SetItemError(item, "后端子不在可选列表中!\r\n");
|
||||
}
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(item.FrontTerminalModel) || !string.IsNullOrEmpty(item.RearTerminalModel))
|
||||
{
|
||||
SetItemError(item, "该型号无可用端子!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckDuplicateModel(StuffedDataModel item)
|
||||
{
|
||||
if (StuffedData.Count(it => it != null && it.Model == item.Model) > 1)
|
||||
{
|
||||
SetItemError(item, $"{item.Model} 该型号存在重复!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void SetItemError(StuffedDataModel item, string errorMsg)
|
||||
{
|
||||
item.IsError = true;
|
||||
item.ErrorCount += 1;
|
||||
item.CheckedMsg += errorMsg;
|
||||
}
|
||||
|
||||
private List<string> GetCanUsedTerminal(string wireModel)
|
||||
{
|
||||
var result = ExcelHelper.GetWireTerminalMappingTable(wireModel);
|
||||
var terminals = new List<string>();
|
||||
var excelModels = result as ExcelModel[] ?? result.ToArray();
|
||||
if (!excelModels.Any()) return terminals;
|
||||
foreach (var item in excelModels)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.FlatTerminal))
|
||||
terminals.Add(item.FlatTerminal);
|
||||
if (!string.IsNullOrEmpty(item.PinTerminal))
|
||||
terminals.Add(item.PinTerminal);
|
||||
if (!string.IsNullOrEmpty(item.OTypeTerminal))
|
||||
terminals.Add(item.OTypeTerminal);
|
||||
if (!string.IsNullOrEmpty(item.YTypeTerminal))
|
||||
terminals.Add(item.YTypeTerminal);
|
||||
}
|
||||
return terminals;
|
||||
}
|
||||
|
||||
private void CheckImprint(StuffedDataModel item)
|
||||
{
|
||||
var imprintConditions = new List<(string Prefix, WireFlagType? FlagType, string Color)>
|
||||
{
|
||||
("L1", WireFlagType.Dual, "褐色"),
|
||||
("R", WireFlagType.Single, "褐色"),
|
||||
("L1", WireFlagType.Mix, "褐色"),
|
||||
("R", WireFlagType.Mix, "褐色"),
|
||||
("L2", WireFlagType.Dual, "黑色"),
|
||||
("S", WireFlagType.Single, "黑色"),
|
||||
("L2", WireFlagType.Mix, "黑色"),
|
||||
("S", WireFlagType.Mix, "黑色"),
|
||||
("L3", WireFlagType.Dual, "灰色"),
|
||||
("T", WireFlagType.Single, "灰色"),
|
||||
("L3", WireFlagType.Mix, "灰色"),
|
||||
("T", WireFlagType.Mix, "灰色"),
|
||||
("PE", null, "绿色")
|
||||
};
|
||||
|
||||
foreach (var condition in imprintConditions)
|
||||
{
|
||||
CheckImprintCondition(item, condition.Prefix, condition.FlagType, condition.Color);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckImprintCondition(StuffedDataModel item, string imprintPrefix, WireFlagType? flagType, string expectedColor)
|
||||
{
|
||||
if (item.Imprint.StartsWith(imprintPrefix) && (flagType == null || FlagType == flagType))
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.DiscolorationDesc))
|
||||
{
|
||||
SetItemError(item, "变色管信息为空\r\n");
|
||||
}
|
||||
else if (!item.DiscolorationDesc.Contains(expectedColor))
|
||||
{
|
||||
SetItemError(item, $"变色管颜色有误,应该使用{expectedColor}\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,543 @@
|
|||
using EPLAN.Harness.Common.Extensions;
|
||||
using EPLAN.Harness.Core.Controls;
|
||||
using EPLAN.Harness.ProjectCore.Report;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Utils;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using static Sinvo.EplanHpD.Plugin.WPFUI.MainWindow;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel;
|
||||
|
||||
public partial class MainViewModel : INotifyPropertyChanged
|
||||
{
|
||||
#region Properties
|
||||
public UpdateDataGridColumns UpdateDataGridColumns;
|
||||
|
||||
private ObservableCollection<ReportModel> data;
|
||||
private ObservableCollection<StuffedDataModel> stuffedData;
|
||||
private ObservableCollection<ExportModel> exportData;
|
||||
private ObservableCollection<DataGridColumn> dataColumns;
|
||||
public ObservableCollection<ReportModel> Data
|
||||
{
|
||||
get => data;
|
||||
set
|
||||
{
|
||||
data = value;
|
||||
OnPropertyChanged(nameof(Data));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<StuffedDataModel> StuffedData
|
||||
{
|
||||
get => stuffedData;
|
||||
set
|
||||
{
|
||||
stuffedData = value;
|
||||
OnPropertyChanged(nameof(StuffedData));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<ExportModel> ExportData
|
||||
{
|
||||
get => exportData;
|
||||
set
|
||||
{
|
||||
exportData = value;
|
||||
OnPropertyChanged(nameof(ExportData));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<DataGridColumn> DataColumns
|
||||
{
|
||||
get => dataColumns;
|
||||
set
|
||||
{
|
||||
dataColumns = value;
|
||||
OnPropertyChanged(nameof(DataColumns));
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isRequireCe;
|
||||
public bool IsRequireCe
|
||||
{
|
||||
get => _isRequireCe;
|
||||
set
|
||||
{
|
||||
_isRequireCe = value;
|
||||
OnPropertyChanged(nameof(IsRequireCe));
|
||||
}
|
||||
}
|
||||
private string _projectNo;
|
||||
public string ProjectNo
|
||||
{
|
||||
get => _projectNo;
|
||||
set
|
||||
{
|
||||
_projectNo = value;
|
||||
OnPropertyChanged(nameof(ProjectNo));
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isUseDiscoloration;
|
||||
/// <summary>
|
||||
/// 是否使用变色管
|
||||
/// </summary>
|
||||
public bool IsUseDiscoloration
|
||||
{
|
||||
get => _isUseDiscoloration;
|
||||
set
|
||||
{
|
||||
_isUseDiscoloration = value;
|
||||
OnPropertyChanged(nameof(IsUseDiscoloration));
|
||||
}
|
||||
}
|
||||
private string _mechanismNo;
|
||||
/// <summary>
|
||||
/// 机构号
|
||||
/// </summary>
|
||||
public string MechanismNo
|
||||
{
|
||||
get => _mechanismNo;
|
||||
set
|
||||
{
|
||||
_mechanismNo = value;
|
||||
OnPropertyChanged(nameof(MechanismNo));
|
||||
}
|
||||
}
|
||||
private string _mechanismName;
|
||||
/// <summary>
|
||||
/// 机构名称
|
||||
/// </summary>
|
||||
public string MechanismName
|
||||
{
|
||||
get => _mechanismName;
|
||||
set
|
||||
{
|
||||
_mechanismName = value;
|
||||
OnPropertyChanged(nameof(MechanismName));
|
||||
}
|
||||
}
|
||||
|
||||
private WireFlagType _flagType;
|
||||
public WireFlagType FlagType
|
||||
{
|
||||
get => _flagType;
|
||||
set
|
||||
{
|
||||
_flagType = value;
|
||||
OnPropertyChanged(nameof(FlagType));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Task<List<DataGridTextColumn>> GetColumns(List<ReportColumn> columns)
|
||||
{
|
||||
var dataColumns = new List<DataGridTextColumn>();
|
||||
foreach (var column in columns)
|
||||
{
|
||||
//Trace.WriteLine($"/// {column.Text}\r\n public string {column.ID} {{get;set;}} ");
|
||||
|
||||
dataColumns.Add(new DataGridTextColumn()
|
||||
{
|
||||
Header = column.Text,
|
||||
Binding = new System.Windows.Data.Binding(column.ID)
|
||||
});
|
||||
}
|
||||
return Task.FromResult(dataColumns);
|
||||
}
|
||||
|
||||
public Task<List<ReportModel>> LoadReportDataAsync(IEnumerable<BaseReportEntry> data, List<ReportColumn> columns)
|
||||
{
|
||||
var reportDatas = new ConcurrentBag<ReportModel>();
|
||||
//foreach (var entry in data)
|
||||
data.AsParallel().WithDegreeOfParallelism(8).ForAll(entry =>
|
||||
{
|
||||
var obj = new ReportModel();
|
||||
foreach (var column in columns)
|
||||
{
|
||||
if (!entry.Properties.ContainsKey(column.ColumnID)) continue;
|
||||
var value = entry.Properties[column.ColumnID].GetDisplayValue();
|
||||
var property = typeof(ReportModel).GetProperty(column.ID);
|
||||
if (property != null)
|
||||
{
|
||||
property.SetValue(obj, value ?? "");
|
||||
}
|
||||
}
|
||||
reportDatas.Add(obj);
|
||||
}
|
||||
);
|
||||
return Task.FromResult(reportDatas.ToList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void LoadReportData(IEnumerable<BaseReportEntry> data, List<ReportColumn> columns)
|
||||
{
|
||||
DataColumns = [];
|
||||
//foreach (var column in columns)
|
||||
//{
|
||||
// //Trace.WriteLine($"/// {column.Text}\r\n public string {column.ID} {{get;set;}} ");
|
||||
|
||||
// DataColumns.Add(new DataGridTextColumn()
|
||||
// {
|
||||
// Header = column.Text,
|
||||
// Binding = new System.Windows.Data.Binding(column.ID)
|
||||
// });
|
||||
//}
|
||||
|
||||
//DataColumns.Add(new DataGridTextColumn()
|
||||
//{
|
||||
// Header = "变色管信息",
|
||||
// Binding = new System.Windows.Data.Binding("DiscolorationDesc")
|
||||
//});
|
||||
|
||||
//Data = [];
|
||||
//var reportDatas = new ConcurrentBag<ReportModel>();
|
||||
////foreach (var entry in data)
|
||||
//data.AsParallel().WithDegreeOfParallelism(8).ForAll(entry =>
|
||||
// {
|
||||
// var obj = new ReportModel();
|
||||
// foreach (var column in columns)
|
||||
// {
|
||||
// if (!entry.Properties.ContainsKey(column.ColumnID)) continue;
|
||||
// var value = entry.Properties[column.ColumnID].GetDisplayValue();
|
||||
// var property = typeof(ReportModel).GetProperty(column.ID);
|
||||
// if (property != null)
|
||||
// {
|
||||
// property.SetValue(obj, value ?? "");
|
||||
// }
|
||||
// }
|
||||
// reportDatas.Add(obj);
|
||||
// }
|
||||
//);
|
||||
//if (reportDatas != null && reportDatas.Any())
|
||||
//{
|
||||
// reportDatas.ToList().ForEach(Data.Add);
|
||||
//}
|
||||
//UpdateDataGridColumns([.. DataColumns], DataGridType.Originial);
|
||||
//StuffedData = [];
|
||||
//StuffData().ForEach(item =>
|
||||
//{
|
||||
// if (item != null)
|
||||
// {
|
||||
// StuffedData.Add(item);
|
||||
// }
|
||||
//});
|
||||
//OnPropertyChanged(nameof(StuffedDatas));
|
||||
|
||||
}
|
||||
|
||||
public async Task<List<StuffedDataModel>> StuffData(List<ReportModel> data)
|
||||
{
|
||||
var datas = new ConcurrentBag<StuffedDataModel>();
|
||||
var isAllCe = true;
|
||||
var isL1 = false;
|
||||
var isL2 = false;
|
||||
var isL3 = false;
|
||||
var isPe = false;
|
||||
//foreach (var item in Data)
|
||||
data.AsParallel().WithDegreeOfParallelism(8).ForAll(item =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
if (item == null) return;
|
||||
//var data = item.MemoryClone<ReportModel>();
|
||||
//new ReportModel
|
||||
//{
|
||||
// Project = item.Project,
|
||||
// Document = item.Document,
|
||||
// CableName = item.CableName,
|
||||
// PartNumber = item.PartNumber,
|
||||
// ManufacturerCompany = item.ManufacturerCompany,
|
||||
// Imprint = item.Imprint,
|
||||
// Length = item.Length,
|
||||
// OutsideDiameter = item.OutsideDiameter,
|
||||
// CoreDiameter = item.CoreDiameter,
|
||||
// ERPNr = item.ERPNr,
|
||||
// DisplayColor = item.DisplayColor,
|
||||
// DisplayStripeColor = item.DisplayStripeColor,
|
||||
// WireName = item.WireName,
|
||||
// WireTwisted = item.WireTwisted,
|
||||
// ConnectorFrom = item.ConnectorFrom,
|
||||
// ConnectorFromERPNr = item.ConnectorFromERPNr,
|
||||
//};
|
||||
|
||||
var data = new StuffedDataModel();
|
||||
|
||||
if (!string.IsNullOrEmpty(item.PartNumber))
|
||||
{
|
||||
if (!item.PartNumber.Contains("-CE/"))
|
||||
{
|
||||
isAllCe = false;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.Imprint))
|
||||
{
|
||||
if (item.Imprint.StartsWith("L1"))
|
||||
{
|
||||
isL1 = true;
|
||||
}
|
||||
|
||||
if (item.Imprint.StartsWith("L2"))
|
||||
{
|
||||
isL2 = true;
|
||||
}
|
||||
|
||||
if (item.Imprint.StartsWith("L3"))
|
||||
{
|
||||
isL3 = true;
|
||||
}
|
||||
|
||||
if (item.Imprint.StartsWith("PE"))
|
||||
{
|
||||
isPe = true;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.Imprint) && item.Imprint.Contains("&"))
|
||||
{
|
||||
var splitImprint = item.Imprint.Split('&');
|
||||
if (splitImprint != null)
|
||||
{
|
||||
data.WireNumber = item.Imprint = splitImprint[0];
|
||||
data.DiscolorationDesc = splitImprint[1];
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
data.WireNumber = item.Imprint;
|
||||
}
|
||||
data.Imprint = item.Imprint;
|
||||
data.WireColor = GetWireColorCode(item.DisplayColor, item.DisplayStripeColor);
|
||||
//if (string.IsNullOrEmpty(data.WireColor))
|
||||
//{
|
||||
// data.IsError = true;
|
||||
// data.CheckedMsg += "线色不符合规范\r\n";
|
||||
//}
|
||||
data.WireModel = item.PartNumber;
|
||||
data.WireCode = item.ERPNr;
|
||||
data.WireName = item.WireName;
|
||||
//if (string.IsNullOrEmpty(data.WireCode))
|
||||
//{
|
||||
// data.IsError = true;
|
||||
// data.CheckedMsg += "线材编码为空\r\n";
|
||||
//}
|
||||
data.FrontTerminalModel = item.ConnectorFrom;
|
||||
data.FrontTerminalMaterialCode = item.ConnectorFromERPNr;
|
||||
//if (string.IsNullOrEmpty(data.FrontTerminalMaterialCode))
|
||||
//{
|
||||
// data.IsError = true;
|
||||
// data.CheckedMsg += "前端子物料编码为空\r\n";
|
||||
//}
|
||||
data.FrontStripLength = item.StripLengthFrom;
|
||||
data.RearTerminalModel = item.ConnectorTo;
|
||||
data.RearTerminalMaterialCode = item.ConnectorToERPNr;
|
||||
//if (string.IsNullOrEmpty(data.RearTerminalMaterialCode))
|
||||
//{
|
||||
// data.IsError = true;
|
||||
// data.CheckedMsg = "后端子物料编码为空\r\n";
|
||||
//}
|
||||
data.RearStripLength = item.StripLengthTo;
|
||||
|
||||
//MID(输出报表!J2,1,FIND(" mm2",输出报表!J2)-1)
|
||||
data.CrossSection = item.CoreDiameter.Replace(" mm2", "").Trim();
|
||||
//=ROUND(MID(输出报表!H2,1,FIND(" mm",输出报表!H2)-1),0)+0
|
||||
data.WireLength = item.Length.Replace(" mm", "").Trim();
|
||||
//data.WireNumber = item.Imprint;
|
||||
data.Quantity = 1;
|
||||
//"RV-"&A2&"-"&"1×"&J2&"-"&L2&"-"&"16×N2"&"-"&M2
|
||||
data.Model = $"RV-{data.WireColor}-1x{data.CrossSection}-{data.WireLength}-16×N2-{data.WireNumber}";
|
||||
//data.IsChecked = true;
|
||||
if (!string.IsNullOrEmpty(data.DiscolorationDesc))
|
||||
{
|
||||
var results = ExcelHelper.GetInsulationSoftSleeveTable(data.DiscolorationDesc);
|
||||
var insulationModels = results as InsulationModel[] ?? results.ToArray();
|
||||
if (insulationModels.Any())
|
||||
{
|
||||
data.Insulation = insulationModels.First();
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Insulation = new InsulationModel();
|
||||
}
|
||||
|
||||
|
||||
//if (datas.Any(it => it.Model == data.Model))
|
||||
//{
|
||||
|
||||
// var existsItem = datas.First(it => it.Model == data.Model);
|
||||
// if (existsItem != null)
|
||||
// {
|
||||
// existsItem.Quantity += 1;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
{
|
||||
if (data != null)
|
||||
datas.Add(data);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Trace.WriteLine($"{ex}");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
IsRequireCe = isAllCe;
|
||||
IsUseDiscoloration = isL1 && isL2 && isL3 && isPe;
|
||||
Trace.WriteLine($"isAllCE: {isAllCe}");
|
||||
Trace.WriteLine($"isSDIProject: {isL1 && isL2 && isL3 && isPe}");
|
||||
return await Task.FromResult<List<StuffedDataModel>>([.. datas]);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取颜色代号
|
||||
/// TODO : 改成从excel中读取基本资料
|
||||
/// </summary>
|
||||
/// <param name="displayColor"></param>
|
||||
/// <param name="displayStripeColor"></param>
|
||||
/// <returns></returns>
|
||||
private static string GetWireColorCode(string displayColor, string displayStripeColor = null)
|
||||
{
|
||||
|
||||
string colorCode;
|
||||
|
||||
if (displayColor == "黄色" && displayStripeColor == "绿色")
|
||||
{
|
||||
return "GNYE";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
colorCode = displayColor switch
|
||||
{
|
||||
"红色" => "RD",
|
||||
"黄色" => "YE",
|
||||
"蓝色" => "BU",
|
||||
"绿色" => "GN",
|
||||
"黑色" => "BK",
|
||||
"灰色" => "GR",
|
||||
"白色" => "WH",
|
||||
"棕色" => "BN",
|
||||
"橙色" => "OG",
|
||||
"紫色" => "VT",
|
||||
"绿/黄双色" => "GNYE",
|
||||
"浅蓝色" => "BU",
|
||||
_ => "",
|
||||
};
|
||||
}
|
||||
return colorCode;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取号码管规格
|
||||
/// </summary>
|
||||
public string GetNumberTubeSpecification(string crossSection, string colorCode)
|
||||
{
|
||||
if (crossSection == "16")
|
||||
{
|
||||
if (colorCode == "YE") return "黄色热缩管φ12/定制";
|
||||
if (colorCode == "GN") return "绿色热缩管φ12/定制";
|
||||
if (colorCode == "RD") return "红色热缩管φ12/定制";
|
||||
if (colorCode == "BU") return "蓝色热缩管φ12/定制";
|
||||
if (colorCode == "GNYE") return "黄绿色热缩管φ12/定制";
|
||||
}
|
||||
else if (crossSection == "0.3" || crossSection == "0.5" || crossSection == "0.75" || crossSection == "1")
|
||||
{
|
||||
return "白色号码管φ2.5/定制";
|
||||
}
|
||||
else if (crossSection == "1.5")
|
||||
{
|
||||
return "白色号码管φ3/定制";
|
||||
}
|
||||
else if (crossSection == "2.5")
|
||||
{
|
||||
return "白色号码管φ4/定制";
|
||||
}
|
||||
else if (crossSection == "4")
|
||||
{
|
||||
return "白色号码管φ5/定制";
|
||||
}
|
||||
else if (crossSection == "6")
|
||||
{
|
||||
return "白色号码管φ6/定制";
|
||||
}
|
||||
else if (crossSection == "10")
|
||||
{
|
||||
return "白色号码管φ8/定制";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
|
||||
public void GenExportData()
|
||||
{
|
||||
if (StuffedData.Any(it => !it.IsIgnore && (!it.IsChecked || it.IsError)))
|
||||
{
|
||||
FlexMessageBox.Info("存在未检查通过或是未做检查,不允许生成!");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(MechanismNo) || string.IsNullOrEmpty(MechanismName))
|
||||
{
|
||||
FlexMessageBox.Info("机构信息未完善,不允许生成!");
|
||||
return;
|
||||
}
|
||||
ExportData = [];
|
||||
int seqNo = 1;
|
||||
var dataList = new List<ExportModel>();
|
||||
//foreach (var stuffedDataModel in StuffedData)
|
||||
StuffedData.AsParallel().WithDegreeOfParallelism(1).ForAll(stuffedDataModel =>
|
||||
|
||||
{
|
||||
var numberTubeSpec = GetNumberTubeSpecification(stuffedDataModel.CrossSection, stuffedDataModel.WireColor);
|
||||
var exportModel = new ExportModel
|
||||
{
|
||||
SeqNo = seqNo.ToString(),
|
||||
MechanismName = MechanismName,
|
||||
MechanismNo = MechanismNo,
|
||||
DrawNo = stuffedDataModel.Model,
|
||||
MaterialCode = "",
|
||||
WireOrTubeSpec = stuffedDataModel.WireModel,
|
||||
WireOrTubeMaterialNo = stuffedDataModel.WireCode,
|
||||
WireOrTubeLength = Math.Round(double.Parse(stuffedDataModel.WireLength), 0),
|
||||
NumberTubeSpec = numberTubeSpec,
|
||||
NumberTubeMaterialNo = ExcelHelper.GetNumberTube(numberTubeSpec),
|
||||
NumberTubeContent = stuffedDataModel.Imprint,
|
||||
FrontTerminalModel = stuffedDataModel.FrontTerminalModel,
|
||||
FrontTerminalMaterialNo = stuffedDataModel.FrontTerminalMaterialCode,
|
||||
FrontTerminalStripLength = stuffedDataModel.FrontStripLength,
|
||||
RearTerminalModel = stuffedDataModel.RearTerminalModel,
|
||||
RearTerminalMaterialNo = stuffedDataModel.RearTerminalMaterialCode,
|
||||
RearTerminalStripLength = stuffedDataModel.RearStripLength,
|
||||
InsulationModel = stuffedDataModel.Insulation?.Specification,
|
||||
InsulationMaterialNo = stuffedDataModel.Insulation?.MaterialCode
|
||||
};
|
||||
seqNo++;
|
||||
dataList.Add(exportModel);
|
||||
}
|
||||
);
|
||||
if (dataList != null && dataList.Any())
|
||||
{
|
||||
dataList.ForEach(ExportData.Add);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35327.3
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sinvo.EplanHpD.Plugin", "Sinvo.EplanHpD.Plugin\Sinvo.EplanHpD.Plugin.csproj", "{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sinvo.EplanHpD.Plugin.WPFUI", "Sinvo.EplanHpD.Plugin.WPFUI\Sinvo.EplanHpD.Plugin.WPFUI.csproj", "{2DBCD22A-650D-4797-9908-9C4D5D6665FE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|x64.Build.0 = Debug|x64
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|x64.ActiveCfg = Release|x64
|
||||
{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|x64.Build.0 = Release|x64
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|x64.Build.0 = Debug|x64
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|x64.ActiveCfg = Release|x64
|
||||
{2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {ED3618D4-5B40-4CB3-AA90-DBD03F7145C3}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Oo]ut/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider 忽略的文件
|
||||
/.idea.Sinvo.EplanHpD.Plugin.iml
|
||||
/contentModel.xml
|
||||
/modules.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
using EPLAN.Harness.API;
|
||||
using EPLAN.Harness.API.Plugins;
|
||||
using EPLAN.Harness.API.Plugins.Core;
|
||||
using EPLAN.Harness.Core.Controls;
|
||||
using EPLAN.Harness.ProjectCore;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin
|
||||
{
|
||||
public class PluginEntry : IHpDPlugin
|
||||
{
|
||||
public string Name => "兴禾ProD插件";
|
||||
|
||||
public string Author => "Sinvo";
|
||||
|
||||
public string Description => "兴禾EPLAN Harness proD 2.9 Studio插件,提供检查线材资料功能";
|
||||
|
||||
/// <summary>
|
||||
/// 获取DLL版本
|
||||
/// </summary>
|
||||
public Version Version => Assembly.GetExecutingAssembly().GetName().Version;
|
||||
|
||||
public System.Drawing.Image ToolbarIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
var imageBytes = Resource.Sinvo;
|
||||
if (imageBytes != null)
|
||||
{
|
||||
using (var ms = new MemoryStream(imageBytes))
|
||||
{
|
||||
return Image.FromStream(ms);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToolbarText => "线材资料检查";
|
||||
|
||||
public string ToolbarTooltip => "线材资料检查";
|
||||
|
||||
public HpDModule Module => HpDModule.Report;
|
||||
|
||||
|
||||
public void Execute(HpdApi api)
|
||||
{
|
||||
try
|
||||
{
|
||||
var doc = api.CurrentProject.GetActiveDocument();
|
||||
//if(doc is FlexReport)
|
||||
if (doc is EPLAN.Harness.API.Projects.Documents.Report report)
|
||||
{
|
||||
var reportId = report.ID;
|
||||
var allReports = FlexProject.CurrentProject.GetReports();
|
||||
if (allReports.Any(item => item.ID == reportId))
|
||||
{
|
||||
var flexReport = allReports.Where(item => item.ID == reportId).First();
|
||||
if (flexReport != null)
|
||||
{
|
||||
var isNeedUpdate = FlexReport.IsUpToDate(flexReport);
|
||||
if (!isNeedUpdate)
|
||||
{
|
||||
if (FlexMessageBox.Warning(FlexMessageBox.Buttons.OK_CANCEL,
|
||||
"Report",
|
||||
"报表数据不是最新的,是否更新?", false) == DialogResult.OK)
|
||||
{
|
||||
flexReport.UpdateReport();
|
||||
}
|
||||
}
|
||||
// 取可见的列
|
||||
var columns = flexReport.Reporter.Formater.RepColumns;
|
||||
var datas = flexReport.GetAllReportEntries();
|
||||
var window = new MainWindow(datas, columns);
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FlexMessageBox.Error("未找到项目中匹配的报表,请检查是否生成成功或是未保存到项目中!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FlexMessageBox.Error("请打开一个报表后再使用!");
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
FlexMessageBox.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Sinvo.EplanHpD.Plugin")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Sinvo.EplanHpD.Plugin")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("5bda26f8-001f-4c54-b992-7cc5ae5ed08b")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1 @@
|
|||
# Sinvo.EplanHpD.Plugin
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,625 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Wpf.Ui.Abstractions</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Wpf.Ui.Abstractions.Controls.INavigableView`1">
|
||||
<summary>
|
||||
A component whose ViewModel is separate from the DataContext and can be navigated by INavigationView.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the ViewModel associated with the view. This type optionally may implement <see cref="T:Wpf.Ui.Abstractions.Controls.INavigationAware"/> to participate in navigation processes.</typeparam>
|
||||
</member>
|
||||
<member name="P:Wpf.Ui.Abstractions.Controls.INavigableView`1.ViewModel">
|
||||
<summary>
|
||||
Gets the view model used by the view.
|
||||
Optionally, it may implement <see cref="T:Wpf.Ui.Abstractions.Controls.INavigationAware"/> and be navigated by INavigationView.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Wpf.Ui.Abstractions.Controls.INavigationAware">
|
||||
<summary>
|
||||
Notifies class about being navigated.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.Controls.INavigationAware.OnNavigatedToAsync">
|
||||
<summary>
|
||||
Asynchronously handles the event that is fired after the component is navigated to.
|
||||
</summary>
|
||||
<returns>A task that represents the asynchronous operation.</returns>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.Controls.INavigationAware.OnNavigatedFromAsync">
|
||||
<summary>
|
||||
Asynchronously handles the event that is fired before the component is navigated from.
|
||||
</summary>
|
||||
<returns>A task that represents the asynchronous operation.</returns>
|
||||
</member>
|
||||
<member name="T:Wpf.Ui.Abstractions.Controls.NavigationAware">
|
||||
<summary>
|
||||
Provides a base class for navigation-aware components.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.Controls.NavigationAware.OnNavigatedToAsync">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.Controls.NavigationAware.OnNavigatedTo">
|
||||
<summary>
|
||||
Handles the event that is fired after the component is navigated to.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.Controls.NavigationAware.OnNavigatedFromAsync">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.Controls.NavigationAware.OnNavigatedFrom">
|
||||
<summary>
|
||||
Handles the event that is fired before the component is navigated from.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Wpf.Ui.Abstractions.INavigationViewPageProvider">
|
||||
<summary>
|
||||
Defines a service that provides pages for navigation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.INavigationViewPageProvider.GetPage(System.Type)">
|
||||
<summary>
|
||||
Retrieves a page of the specified type.
|
||||
</summary>
|
||||
<param name="pageType">The type of the page to retrieve.</param>
|
||||
<returns>An instance of the specified page type, or null if the page is not found.</returns>
|
||||
</member>
|
||||
<member name="T:Wpf.Ui.Abstractions.NavigationException">
|
||||
<summary>
|
||||
Represents errors that occur during navigation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.NavigationException.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the NavigationException class with a specified error message.
|
||||
</summary>
|
||||
<param name="message">The message that describes the error.</param>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.NavigationException.#ctor(System.Exception,System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the NavigationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
|
||||
</summary>
|
||||
<param name="e">The exception that is the cause of the current exception.</param>
|
||||
<param name="message">The message that describes the error.</param>
|
||||
</member>
|
||||
<member name="T:Wpf.Ui.Abstractions.NavigationViewPageProviderExtensions">
|
||||
<summary>
|
||||
Provides extension methods for the INavigationViewPageProvider interface.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.NavigationViewPageProviderExtensions.GetPage``1(Wpf.Ui.Abstractions.INavigationViewPageProvider)">
|
||||
<summary>
|
||||
Retrieves a page of the specified type from the page service.
|
||||
</summary>
|
||||
<typeparam name="TPage">The type of the page to retrieve.</typeparam>
|
||||
<param name="navigationViewPageProvider">The page service instance.</param>
|
||||
<returns>An instance of the specified page type, or null if the page is not found.</returns>
|
||||
</member>
|
||||
<member name="M:Wpf.Ui.Abstractions.NavigationViewPageProviderExtensions.GetRequiredPage``1(Wpf.Ui.Abstractions.INavigationViewPageProvider)">
|
||||
<summary>
|
||||
Retrieves a page of the specified type from the page service.
|
||||
Throws a NavigationException if the page is not found.
|
||||
</summary>
|
||||
<typeparam name="TPage">The type of the page to retrieve.</typeparam>
|
||||
<param name="navigationViewPageProvider">The page service instance.</param>
|
||||
<returns>An instance of the specified page type.</returns>
|
||||
<exception cref="T:Wpf.Ui.Abstractions.NavigationException">Thrown when the specified page type is not found.</exception>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.AllowNullAttribute">
|
||||
<summary>
|
||||
Specifies that null is allowed as an input even if the corresponding type disallows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.DisallowNullAttribute">
|
||||
<summary>
|
||||
Specifies that null is disallowed as an input even if the corresponding type allows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute">
|
||||
<summary>
|
||||
Applied to a method that will never return under any circumstance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute">
|
||||
<summary>
|
||||
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute.#ctor(System.Boolean)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified parameter value.
|
||||
</summary>
|
||||
<param name="parameterValue">
|
||||
The condition parameter value. Code after the method will be considered unreachable
|
||||
by diagnostics if the argument to the associated parameter matches this value.
|
||||
</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute.ParameterValue">
|
||||
<summary>
|
||||
Gets the condition parameter value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute">
|
||||
<summary>
|
||||
Indicates that an API is experimental and it may change in the future.
|
||||
</summary>
|
||||
<remarks>
|
||||
This attribute allows call sites to be flagged with a diagnostic that indicates that an experimental
|
||||
feature is used. Authors can use this attribute to ship preview features in their assemblies.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute"/> class,
|
||||
specifying the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<param name="diagnosticId">The ID that the compiler will use when reporting a use of the API the attribute applies to.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.DiagnosticId">
|
||||
<summary>
|
||||
Gets the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<value>The unique diagnostic ID.</value>
|
||||
<remarks>
|
||||
The diagnostic ID is shown in build output for warnings and errors.
|
||||
<para>This property represents the unique ID that can be used to suppress the warnings or errors, if needed.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat">
|
||||
<summary>
|
||||
Gets or sets the URL for corresponding documentation.
|
||||
The API accepts a format string instead of an actual URL, creating a generic URL that includes the diagnostic ID.
|
||||
</summary>
|
||||
<value>The format string that represents a URL to corresponding documentation.</value>
|
||||
<remarks>An example format string is <c>https://contoso.com/obsoletion-warnings/{0}</c>.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MaybeNullAttribute">
|
||||
<summary>
|
||||
Specifies that an output may be null even if the corresponding type disallows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that when a method returns <see cref="P:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.ReturnValue"/>, the parameter may be null even if the corresponding type disallows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.#ctor(System.Boolean)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter may be null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.ReturnValue">
|
||||
<summary>
|
||||
Gets the return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute">
|
||||
<summary>
|
||||
Specifies that the method or property will ensure that the listed field and property members have not-null values.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with a field or property member.
|
||||
</summary>
|
||||
<param name="member">The field or property member that is promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.#ctor(System.String[])">
|
||||
<summary>
|
||||
Initializes the attribute with the list of field and property members.
|
||||
</summary>
|
||||
<param name="members">The list of field and property members that are promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.Members">
|
||||
<summary>
|
||||
Gets field or property member names.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that the method or property will ensure that the listed field and property
|
||||
members have not-null values when returning with the specified return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.#ctor(System.Boolean,System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition and a field or property member.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
<param name="member">The field or property member that is promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.#ctor(System.Boolean,System.String[])">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition and list of field and property members.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
<param name="members">The list of field and property members that are promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.ReturnValue">
|
||||
<summary>
|
||||
Gets the return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.Members">
|
||||
<summary>
|
||||
Gets field or property member names.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.NotNullAttribute">
|
||||
<summary>
|
||||
Specifies that an output will not be null even if the corresponding type allows it.
|
||||
Specifies that an input argument was not null when the call returns.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute">
|
||||
<summary>
|
||||
Specifies that the output will be non-null if the named parameter is non-null.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with the associated parameter name.
|
||||
</summary>
|
||||
<param name="parameterName">The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute.ParameterName">
|
||||
<summary>
|
||||
Gets the associated parameter name.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that when a method returns <see cref="P:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.ReturnValue"/>, the parameter will not be null even if the corresponding type allows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.#ctor(System.Boolean)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.ReturnValue">
|
||||
<summary>Gets the return value condition.</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute">
|
||||
<summary>
|
||||
Specifies that this constructor sets all required members for the current type,
|
||||
and callers do not need to set any required members themselves.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute">
|
||||
<summary>
|
||||
Specifies the syntax used in a string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.
|
||||
</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String,System.Object[])">
|
||||
<summary>Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
<param name="arguments">Optional arguments associated with the specific syntax employed.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Syntax">
|
||||
<summary>Gets the identifier of the syntax used.</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Arguments">
|
||||
<summary>Optional arguments associated with the specific syntax employed.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.CompositeFormat">
|
||||
<summary>The syntax identifier for strings containing composite formats for string formatting.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing date format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateTimeFormat">
|
||||
<summary>The syntax identifier for strings containing date and time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.EnumFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Enum"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.GuidFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Guid"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Json">
|
||||
<summary>The syntax identifier for strings containing JavaScript Object Notation (JSON).</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.NumericFormat">
|
||||
<summary>The syntax identifier for strings containing numeric format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex">
|
||||
<summary>The syntax identifier for strings containing regular expressions.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeSpanFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.TimeSpan"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Uri">
|
||||
<summary>The syntax identifier for strings containing URIs.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Xml">
|
||||
<summary>The syntax identifier for strings containing XML.</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute">
|
||||
<summary>
|
||||
Used to indicate a byref escapes and is not scoped.
|
||||
</summary>
|
||||
<remarks>
|
||||
<para>
|
||||
There are several cases where the C# compiler treats a <see langword="ref"/> as implicitly
|
||||
<see langword="scoped"/> - where the compiler does not allow the <see langword="ref"/> to escape the method.
|
||||
</para>
|
||||
<para>
|
||||
For example:
|
||||
<list type="number">
|
||||
<item><see langword="this"/> for <see langword="struct"/> instance methods.</item>
|
||||
<item><see langword="ref"/> parameters that refer to <see langword="ref"/> <see langword="struct"/> types.</item>
|
||||
<item><see langword="out"/> parameters.</item>
|
||||
</list>
|
||||
</para>
|
||||
<para>
|
||||
This attribute is used in those instances where the <see langword="ref"/> should be allowed to escape.
|
||||
</para>
|
||||
<para>
|
||||
Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for
|
||||
API authors to understand the lifetime implications of applying this attribute and how it may impact their users.
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Index">
|
||||
<summary>Represent a type can be used to index a collection either from the start or the end.</summary>
|
||||
<remarks>
|
||||
Index is used by the C# compiler to support the new index syntax
|
||||
<code>
|
||||
int[] someArray = new int[5] { 1, 2, 3, 4, 5 } ;
|
||||
int lastElement = someArray[^1]; // lastElement = 5
|
||||
</code>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Index.#ctor(System.Int32,System.Boolean)">
|
||||
<summary>Construct an Index using a value and indicating if the index is from the start or from the end.</summary>
|
||||
<param name="value">The index value. it has to be zero or positive number.</param>
|
||||
<param name="fromEnd">Indicating if the index is from the start or from the end.</param>
|
||||
<remarks>
|
||||
If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Index.Start">
|
||||
<summary>Create an Index pointing at first element.</summary>
|
||||
</member>
|
||||
<member name="P:System.Index.End">
|
||||
<summary>Create an Index pointing at beyond last element.</summary>
|
||||
</member>
|
||||
<member name="M:System.Index.FromStart(System.Int32)">
|
||||
<summary>Create an Index from the start at the position indicated by the value.</summary>
|
||||
<param name="value">The index value from the start.</param>
|
||||
</member>
|
||||
<member name="M:System.Index.FromEnd(System.Int32)">
|
||||
<summary>Create an Index from the end at the position indicated by the value.</summary>
|
||||
<param name="value">The index value from the end.</param>
|
||||
</member>
|
||||
<member name="P:System.Index.Value">
|
||||
<summary>Returns the index value.</summary>
|
||||
</member>
|
||||
<member name="P:System.Index.IsFromEnd">
|
||||
<summary>Indicates whether the index is from the start or the end.</summary>
|
||||
</member>
|
||||
<member name="M:System.Index.GetOffset(System.Int32)">
|
||||
<summary>Calculate the offset from the start using the giving collection length.</summary>
|
||||
<param name="length">The length of the collection that the Index will be used with. length has to be a positive value</param>
|
||||
<remarks>
|
||||
For performance reason, we don't validate the input length parameter and the returned offset value against negative values.
|
||||
we don't validate either the returned offset is greater than the input length.
|
||||
It is expected Index will be used with collections which always have non negative length/count. If the returned offset is negative and
|
||||
then used to index a collection will get out of range exception which will be same affect as the validation.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Index.Equals(System.Object)">
|
||||
<summary>Indicates whether the current Index object is equal to another object of the same type.</summary>
|
||||
<param name="value">An object to compare with this object</param>
|
||||
</member>
|
||||
<member name="M:System.Index.Equals(System.Index)">
|
||||
<summary>Indicates whether the current Index object is equal to another Index object.</summary>
|
||||
<param name="other">An object to compare with this object</param>
|
||||
</member>
|
||||
<member name="M:System.Index.GetHashCode">
|
||||
<summary>Returns the hash code for this instance.</summary>
|
||||
</member>
|
||||
<member name="M:System.Index.op_Implicit(System.Int32)~System.Index">
|
||||
<summary>Converts integer number to an Index.</summary>
|
||||
</member>
|
||||
<member name="M:System.Index.ToString">
|
||||
<summary>Converts the value of the current Index object to its equivalent string representation.</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute">
|
||||
<summary>
|
||||
Indicates the type of the async method builder that should be used by a language compiler to
|
||||
build the attributed async method or to build the attributed type when used as the return type
|
||||
of an async method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute.#ctor(System.Type)">
|
||||
<summary>Initializes the <see cref="T:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"/>.</summary>
|
||||
<param name="builderType">The <see cref="T:System.Type"/> of the associated builder.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute.BuilderType">
|
||||
<summary>Gets the <see cref="T:System.Type"/> of the associated builder.</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute">
|
||||
<summary>
|
||||
An attribute that allows parameters to receive the expression of other parameters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"/> class.
|
||||
</summary>
|
||||
<param name="parameterName">The condition parameter value.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute.ParameterName">
|
||||
<summary>
|
||||
Gets the parameter name the expression is retrieved from.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CollectionBuilderAttribute.#ctor(System.Type,System.String)">
|
||||
<summary>
|
||||
Initialize the attribute to refer to the <paramref name="methodName"/> method on the <paramref name="builderType"/> type.
|
||||
</summary>
|
||||
<param name="builderType">The type of the builder to use to construct the collection.</param>
|
||||
<param name="methodName">The name of the method on the builder to use to construct the collection.</param>
|
||||
<remarks>
|
||||
<paramref name="methodName"/> must refer to a static method that accepts a single parameter of
|
||||
type <see cref="!:ReadOnlySpan<T>"/> and returns an instance of the collection being built containing
|
||||
a copy of the data from that span. In future releases of .NET, additional patterns may be supported.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.BuilderType">
|
||||
<summary>
|
||||
Gets the type of the builder to use to construct the collection.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.MethodName">
|
||||
<summary>
|
||||
Gets the name of the method on the builder to use to construct the collection.
|
||||
</summary>
|
||||
<remarks>
|
||||
This should match the metadata name of the target method.
|
||||
For example, this might be ".ctor" if targeting the type's constructor.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute">
|
||||
<summary>
|
||||
Indicates that compiler support for a particular feature is required for the location where this attribute is applied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new instance of the <see cref="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute"/> type.
|
||||
</summary>
|
||||
<param name="featureName">The name of the feature to indicate.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName">
|
||||
<summary>
|
||||
The name of the compiler feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.IsOptional">
|
||||
<summary>
|
||||
If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RefStructs">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the ref structs C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RequiredMembers">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the required members C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute">
|
||||
<summary>
|
||||
Indicates which arguments to a method involving an interpolated string handler should be passed to that handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
|
||||
</summary>
|
||||
<param name="argument">The name of the argument that should be passed to the handler.</param>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.#ctor(System.String[])">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
|
||||
</summary>
|
||||
<param name="arguments">The names of the arguments that should be passed to the handler.</param>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.Arguments">
|
||||
<summary>
|
||||
Gets the names of the arguments that should be passed to the handler.
|
||||
</summary>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute">
|
||||
<summary>
|
||||
Indicates the attributed type is to be used as an interpolated string handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.IsExternalInit">
|
||||
<summary>
|
||||
Reserved to be used by the compiler for tracking metadata.
|
||||
This class should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.ModuleInitializerAttribute">
|
||||
<summary>
|
||||
Used to indicate to the compiler that a method should be called
|
||||
in its containing module's initializer.
|
||||
</summary>
|
||||
<remarks>
|
||||
When one or more valid methods
|
||||
with this attribute are found in a compilation, the compiler will
|
||||
emit a module initializer which calls each of the attributed methods.
|
||||
|
||||
Certain requirements are imposed on any method targeted with this attribute:
|
||||
- The method must be `static`.
|
||||
- The method must be an ordinary member method, as opposed to a property accessor, constructor, local function, etc.
|
||||
- The method must be parameterless.
|
||||
- The method must return `void`.
|
||||
- The method must not be generic or be contained in a generic type.
|
||||
- The method's effective accessibility must be `internal` or `public`.
|
||||
|
||||
The specification for module initializers in the .NET runtime can be found here:
|
||||
https://github.com/dotnet/runtime/blob/main/docs/design/specs/Ecma-335-Augments.md#module-initializer
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiredMemberAttribute">
|
||||
<summary>
|
||||
Specifies that a type has required members or that a member is required.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiresLocationAttribute">
|
||||
<summary>
|
||||
Reserved for use by a compiler for tracking metadata.
|
||||
This attribute should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.SkipLocalsInitAttribute">
|
||||
<summary>
|
||||
Used to indicate to the compiler that the <c>.locals init</c> flag should not be set in method headers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute"/> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute"/> class with the specified message.
|
||||
</summary>
|
||||
<param name="message">An optional message associated with this attribute instance.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.Message">
|
||||
<summary>
|
||||
Returns the optional message associated with this attribute instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.Url">
|
||||
<summary>
|
||||
Returns the optional URL associated with this attribute instance.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,73 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resource {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resource() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sinvo.EplanHpD.Plugin.Resource", typeof(Resource).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Byte[] 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static byte[] Sinvo {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Sinvo", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Sinvo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Sinvo.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
|
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Sinvo.EplanHpD.Plugin</RootNamespace>
|
||||
<AssemblyName>Sinvo.EplanHpD.Plugin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EPLAN.Harness.API">
|
||||
<HintPath>RefDLL\EPLAN.Harness.API.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.API.Plugins">
|
||||
<HintPath>RefDLL\EPLAN.Harness.API.Plugins.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.API.Plugins.Core">
|
||||
<HintPath>RefDLL\EPLAN.Harness.API.Plugins.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.Common, Version=2.9.2.903, Culture=neutral, PublicKeyToken=57aaa27e22f7b107" />
|
||||
<Reference Include="EPLAN.Harness.Core, Version=2.9.2.903, Culture=neutral, PublicKeyToken=57aaa27e22f7b107, processorArchitecture=AMD64">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>RefDLL\EPLAN.Harness.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPLAN.Harness.ProjectCore, Version=2.9.2.903, Culture=neutral, PublicKeyToken=57aaa27e22f7b107, processorArchitecture=AMD64">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>RefDLL\EPLAN.Harness.ProjectCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="PluginEntry.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resource.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resource.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resource.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Sinvo.EplanHpD.Plugin.WPFUI\Sinvo.EplanHpD.Plugin.WPFUI.csproj">
|
||||
<Project>{2DBCD22A-650D-4797-9908-9C4D5D6665FE}</Project>
|
||||
<Name>Sinvo.EplanHpD.Plugin.WPFUI</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Loading…
Reference in New Issue