Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
a18a98ac
Commit
a18a98ac
authored
Jan 08, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
85bd2cb3
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
105 additions
and
217 deletions
+105
-217
MaterialDesignIcons.xaml
...ibrary/FLY.ControlLibrary/Themes/MaterialDesignIcons.xaml
+7
-0
clipboard-arrow-left.png
...ntrolLibrary/materialdesignicons/clipboard-arrow-left.png
+0
-0
clipboard-arrow-left.xaml
...trolLibrary/materialdesignicons/clipboard-arrow-left.xaml
+1
-0
delete-circle.png
....FLY.ControlLibrary/materialdesignicons/delete-circle.png
+0
-0
playlist-remove.png
...LY.ControlLibrary/materialdesignicons/playlist-remove.png
+0
-0
playlist-remove.xaml
...Y.ControlLibrary/materialdesignicons/playlist-remove.xaml
+1
-0
IgnoreAttribute.cs
Project.FLY.Misc/MISC/IgnoreAttribute.cs
+8
-0
Misc.csproj
Project.FLY.Misc/MISC/Misc.csproj
+1
-0
PropertiesManager.cs
Project.FLY.Misc/MISC/PropertiesManager.cs
+12
-9
FLY.Thick.Base.csproj
Project.FLY.Thick.Base/FLY.Thick.Base/FLY.Thick.Base.csproj
+22
-0
FodyWeavers.xml
Project.FLY.Thick.Base/FLY.Thick.Base/FodyWeavers.xml
+4
-0
BorderSearch.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/BorderSearch.cs
+44
-208
packages.config
Project.FLY.Thick.Base/FLY.Thick.Base/packages.config
+5
-0
No files found.
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/MaterialDesignIcons.xaml
View file @
a18a98ac
...
...
@@ -272,4 +272,11 @@
<Geometry x:Key="Geometry_ruler">
M703.3856 34.440533l289.621333 289.621334a34.133333 34.133333 0 0 1 0 48.264533L365.4656 999.867733a34.133333 34.133333 0 0 1-48.264533 0L27.579733 710.2464a34.133333 34.133333 0 0 1 0-48.298667L655.086933 34.474667a34.133333 34.133333 0 0 1 48.298667 0zM606.8224 179.2l-48.264533 48.264533 96.529066 96.5632 48.298667-48.264533-96.5632-96.5632z m-193.092267 193.092267l-48.264533 48.264533 96.5632 96.5632 48.264533-48.264533-96.5632-96.5632z m-193.092266 193.092266L172.373333 613.6832l96.5632 96.5632 48.264534-48.298667-96.5632-96.529066zM510.293333 275.797333l-48.264533 48.264534 193.058133 193.092266 48.298667-48.264533L510.293333 275.797333z m-193.092266 193.092267L268.936533 517.12l193.092267 193.092267 48.264533-48.298667-193.092266-193.058133z
</Geometry>
<Geometry x:Key="Geometry_clipboard-arrow-left">
M16,15H12V18L7,13L12,8V11H16M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M19,3H14.82C14.4,1.84 13.3,1 12,1C10.7,1 9.6,1.84 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z
</Geometry>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.ControlLibrary/materialdesignicons/clipboard-arrow-left.png
0 → 100644
View file @
a18a98ac
675 Bytes
Project.FLY.ControlLibrary/materialdesignicons/clipboard-arrow-left.xaml
0 → 100644
View file @
a18a98ac
<?xml version="1.0" encoding="UTF-8"?>
<Canvas
xmlns=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x=
"http://schemas.microsoft.com/winfx/2006/xaml"
Width=
"24"
Height=
"24"
><Path
Data=
"M16,15H12V18L7,13L12,8V11H16M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M19,3H14.82C14.4,1.84 13.3,1 12,1C10.7,1 9.6,1.84 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z"
/></Canvas>
\ No newline at end of file
Project.FLY.ControlLibrary/materialdesignicons/delete-circle.png
View replaced file @
85bd2cb3
View file @
a18a98ac
887 Bytes
|
W:
|
H:
887 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
Project.FLY.ControlLibrary/materialdesignicons/playlist-remove.png
0 → 100644
View file @
a18a98ac
560 Bytes
Project.FLY.ControlLibrary/materialdesignicons/playlist-remove.xaml
0 → 100644
View file @
a18a98ac
<?xml version="1.0" encoding="UTF-8"?>
<Canvas
xmlns=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x=
"http://schemas.microsoft.com/winfx/2006/xaml"
Width=
"24"
Height=
"24"
><Path
Data=
"M2,6V8H14V6H2M2,10V12H11V10H2M14.17,10.76L12.76,12.17L15.59,15L12.76,17.83L14.17,19.24L17,16.41L19.83,19.24L21.24,17.83L18.41,15L21.24,12.17L19.83,10.76L17,13.59L14.17,10.76M2,14V16H11V14H2Z"
/></Canvas>
\ No newline at end of file
Project.FLY.Misc/MISC/IgnoreAttribute.cs
0 → 100644
View file @
a18a98ac
using
System
;
namespace
Misc
{
public
class
CopyIgnoreAttribute
:
Attribute
{
}
}
\ No newline at end of file
Project.FLY.Misc/MISC/Misc.csproj
View file @
a18a98ac
...
...
@@ -86,6 +86,7 @@
<Compile
Include=
"CRC.cs"
/>
<Compile
Include=
"DATARANGE.cs"
/>
<Compile
Include=
"Debug.cs"
/>
<Compile
Include=
"IgnoreAttribute.cs"
/>
<Compile
Include=
"ITDParam.cs"
/>
<Compile
Include=
"Log.cs"
/>
<Compile
Include=
"PropertiesManager.cs"
/>
...
...
Project.FLY.Misc/MISC/PropertiesManager.cs
View file @
a18a98ac
...
...
@@ -84,21 +84,24 @@ namespace Misc
foreach
(
PropertyInfo
propertyInfo
in
t
.
GetProperties
())
{
if
(
propertyInfo
.
CanWrite
)
//忽略不复制!!!
if
(
propertyInfo
.
GetCustomAttributes
(
typeof
(
CopyIgnoreAttribute
),
false
).
Count
()
>
0
)
continue
;
//ICopiable
//if (propertyInfo.PropertyType.IsSubclassOf(typeof(ICopiable)))
if
(
typeof
(
ICopiable
).
IsAssignableFrom
(
propertyInfo
.
PropertyType
))
{
propertyInfo
.
SetValue
(
dest
,
propertyInfo
.
GetValue
(
src
,
null
),
null
);
ICopiable
copiable
=
propertyInfo
.
GetValue
(
dest
,
null
)
as
ICopiable
;
copiable
.
Copy
(
propertyInfo
.
GetValue
(
src
,
null
));
}
else
else
if
(
propertyInfo
.
CanWrite
)
{
//ICopiable
if
(
propertyInfo
.
PropertyType
.
IsSubclassOf
(
typeof
(
ICopiable
)))
{
ICopiable
copiable
=
propertyInfo
.
GetValue
(
dest
,
null
)
as
ICopiable
;
copiable
.
Copy
(
propertyInfo
.
GetValue
(
src
,
null
));
}
propertyInfo
.
SetValue
(
dest
,
propertyInfo
.
GetValue
(
src
,
null
),
null
);
}
}
}
}
/// <summary>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/FLY.Thick.Base.csproj
View file @
a18a98ac
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"4.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"..\..\..\Project.FLY.Thick.Normal\packages\PropertyChanged2.Fody.2.5.13\build\PropertyChanged2.Fody.props"
Condition=
"Exists('..\..\..\Project.FLY.Thick.Normal\packages\PropertyChanged2.Fody.2.5.13\build\PropertyChanged2.Fody.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
...
...
@@ -12,6 +13,8 @@
<AssemblyName>
FLY.Thick.Base
</AssemblyName>
<TargetFrameworkVersion>
v4.0
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<DebugSymbols>
true
</DebugSymbols>
...
...
@@ -36,6 +39,9 @@
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"PropertyChanged2, Version=2.5.13.0, Culture=neutral, PublicKeyToken=ee3ee20bcf148ddd, processorArchitecture=MSIL"
>
<HintPath>
..\..\..\Project.FLY.Thick.Normal\packages\PropertyChanged2.Fody.2.5.13\lib\net40\PropertyChanged2.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
...
...
@@ -188,7 +194,23 @@
<Name>
FLY.Thick.BulkDataModule
</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content
Include=
"FodyWeavers.xml"
>
<SubType>
Designer
</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<None
Include=
"packages.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"..\..\..\Project.FLY.Thick.Normal\packages\Fody.3.2.13\build\Fody.targets"
Condition=
"Exists('..\..\..\Project.FLY.Thick.Normal\packages\Fody.3.2.13\build\Fody.targets')"
/>
<Target
Name=
"EnsureNuGetPackageBuildImports"
BeforeTargets=
"PrepareForBuild"
>
<PropertyGroup>
<ErrorText>
这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
</ErrorText>
</PropertyGroup>
<Error
Condition=
"!Exists('..\..\..\Project.FLY.Thick.Normal\packages\Fody.3.2.13\build\Fody.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\..\..\Project.FLY.Thick.Normal\packages\Fody.3.2.13\build\Fody.targets'))"
/>
<Error
Condition=
"!Exists('..\..\..\Project.FLY.Thick.Normal\packages\PropertyChanged2.Fody.2.5.13\build\PropertyChanged2.Fody.props')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\..\..\Project.FLY.Thick.Normal\packages\PropertyChanged2.Fody.2.5.13\build\PropertyChanged2.Fody.props'))"
/>
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/FodyWeavers.xml
0 → 100644
View file @
a18a98ac
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
<PropertyChanged2
/>
</Weavers>
Project.FLY.Thick.Base/FLY.Thick.Base/Server/BorderSearch.cs
View file @
a18a98ac
...
...
@@ -20,269 +20,105 @@ namespace FLY.Thick.Base.Server
#
endregion
#
region
属性,成员变量的代理
//启动与否
private
bool
enable
;
/// <summary>
/// 启动与否
/// </summary>
public
bool
Enable
{
get
{
return
enable
;
}
set
{
if
(
enable
!=
value
)
{
enable
=
value
;
NotifyPropertyChanged
(
"Enable"
);
}
}
}
bool
isbreakdetect
=
true
;
public
bool
Enable
{
get
;
set
;
}
/// <summary>
/// 边界拐点检测,找到的边界更加精确
/// </summary>
public
bool
IsBreakDetect
{
get
{
return
isbreakdetect
;
}
set
{
if
(
isbreakdetect
!=
value
)
{
isbreakdetect
=
value
;
NotifyPropertyChanged
(
"IsBreakDetect"
);
}
}
}
public
bool
IsBreakDetect
{
get
;
set
;
}
=
true
;
protected
Range
[]
border
=
new
Range
[
2
]
{
new
Range
(),
new
Range
()
};
private
Range
valid
=
new
Range
();
/// <summary>
/// 有限范围
/// </summary>
public
Range
Valid
{
get
{
return
valid
;
}
}
public
Range
Valid
{
get
;
}
=
new
Range
();
/// <summary>
/// 边界
/// </summary>
public
Range
Border_Backw
{
get
{
return
border
[
1
];
}
}
public
Range
Border_Forw
{
get
{
return
border
[
0
];
}
}
public
Range
Border_Forw
{
get
{
return
border
[
0
];
}
}
/// <summary>
/// 边界
/// </summary>
public
Range
Border_Backw
{
get
{
return
border
[
1
];
}
}
/// <summary>
/// 膜范围
/// </summary>
public
Range
Border
=
new
Range
();
private
int
width
;
/// <summary>
/// 当前膜宽,测量出来的,单位是 脉冲
/// </summary>
public
int
Width
{
get
{
return
width
;
}
protected
set
{
if
(
width
!=
value
)
{
width
=
value
;
NotifyPropertyChanged
(
"Width"
);
}
}
}
public
int
Width
{
get
;
protected
set
;
}
private
int
mid
;
/// <summary>
/// 膜中间位置 单位 脉冲
/// </summary>
public
int
Mid
{
get
{
return
mid
;
}
protected
set
{
if
(
mid
!=
value
)
{
mid
=
value
;
NotifyPropertyChanged
(
"Mid"
);
}
}
}
bool
tempADBySet
=
false
;
public
int
Mid
{
get
;
protected
set
;
}
/// <summary>
/// 手动设置温修AD值
/// </summary>
public
bool
TempADBySet
{
get
{
return
tempADBySet
;
}
set
{
if
(
tempADBySet
!=
value
)
{
tempADBySet
=
value
;
NotifyPropertyChanged
(
"TempADBySet"
);
}
public
bool
TempADBySet
{
get
;
set
;
}
}
}
private
int
currtempad
=
50000
;
/// <summary>
/// 温修AD值
/// </summary>
public
int
CurrTempAD
{
get
{
return
currtempad
;
}
set
{
if
(
currtempad
!=
value
)
{
currtempad
=
value
;
NotifyPropertyChanged
(
"CurrTempAD"
);
}
}
}
public
int
CurrTempAD
{
get
;
set
;
}
=
50000
;
private
int
tempad
=
50000
;
/// <summary>
/// 温修AD值
/// </summary>
public
int
TempAD
{
get
{
return
tempad
;
}
set
{
if
(
tempad
!=
value
)
{
tempad
=
value
;
NotifyPropertyChanged
(
"TempAD"
);
}
}
}
private
int
temprange
;
public
int
TempAD
{
get
;
set
;
}
=
50000
;
/// <summary>
/// AD超过了范围, 就认为开始找到边界
/// </summary>
public
int
TempRange
{
get
{
return
temprange
;
}
set
{
if
(
temprange
!=
value
)
{
temprange
=
value
;
NotifyPropertyChanged
(
"TempRange"
);
}
}
}
private
int
n
;
public
int
TempRange
{
get
;
set
;
}
/// <summary>
/// 有滤波器,只有非空的连续N个pos以上,才开始算边界开始
/// </summary>
public
int
N
{
get
{
return
n
;
}
set
{
n
=
value
;
NotifyPropertyChanged
(
"N"
);
}
}
public
int
N
{
get
;
set
;
}
private
int
sensorwidth
;
/// <summary>
/// 探头直径,单位脉冲, 膜宽 = 边界范围 - 探头直径
/// </summary>
public
int
SensorWidth
{
get
{
return
sensorwidth
;
}
set
{
if
(
sensorwidth
!=
value
)
{
sensorwidth
=
value
;
NotifyPropertyChanged
(
"SensorWidth"
);
}
}
}
public
int
SensorWidth
{
get
;
set
;
}
private
int
n2
;
/// <summary>
/// 找到边界后,再往内缩N2个脉冲,防止边界找得不准的问题。
/// </summary>
public
int
N2
{
get
{
return
n2
;
}
set
{
n2
=
value
;
NotifyPropertyChanged
(
"N2"
);
}
}
public
int
N2
{
get
;
set
;
}
private
int
n3
;
/// <summary>
/// 记录两个边界以后扫描,以它们再外扩N3个脉冲,作为扫描范围
/// </summary>
public
int
N3
{
get
{
return
n3
;
}
set
{
n3
=
value
;
NotifyPropertyChanged
(
"N3"
);
}
}
public
int
N3
{
get
;
set
;
}
private
int
[]
datas
=
null
;
/// <summary>
/// 用于调试, 进入到边界查找的数据
/// </summary>
public
int
[]
Datas
{
get
{
return
datas
;
}
protected
set
{
datas
=
value
;
}
}
public
int
[]
Datas
{
get
;
set
;
}
=
null
;
#
endregion
...
...
@@ -390,8 +226,8 @@ namespace FLY.Thick.Base.Server
//反向找到边界
isBackFindOut
=
true
;
}
int
min
=
v
alid
.
Begin
;
int
max
=
v
alid
.
End
;
int
min
=
V
alid
.
Begin
;
int
max
=
V
alid
.
End
;
if
(
isForwFindOut
&&
isBackFindOut
)
{
...
...
@@ -415,11 +251,11 @@ namespace FLY.Thick.Base.Server
//}
//范围限制
if
(
min
<
v
alid
.
Begin
)
min
=
v
alid
.
Begin
;
if
(
min
<
V
alid
.
Begin
)
min
=
V
alid
.
Begin
;
if
(
max
>
v
alid
.
End
)
max
=
v
alid
.
End
;
if
(
max
>
V
alid
.
End
)
max
=
V
alid
.
End
;
posBegin
=
min
;
posEnd
=
max
;
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/packages.config
0 → 100644
View file @
a18a98ac
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Fody"
version
=
"3.2.13"
targetFramework
=
"net40"
developmentDependency
=
"true"
/>
<
package
id
=
"PropertyChanged2.Fody"
version
=
"2.5.13"
targetFramework
=
"net40"
/>
</
packages
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment