Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
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
潘栩锋
hemei
Commits
b082f6cf
Commit
b082f6cf
authored
Nov 12, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复 追边测厚仪服务器删除图片历史会出错
2.修复 追边测厚仪服务器保存图片很慢
parent
b6a9baa5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
27 deletions
+86
-27
PicHistory.cs
.../FLY.Thick.Blowing.UI.Fix.Server/PicHistory/PicHistory.cs
+68
-24
ScanGraphVm.cs
...FLY.Thick.Blowing.UI.Fix.Server/PicHistory/ScanGraphVm.cs
+5
-0
WdPicHistory.xaml
....Thick.Blowing.UI.Fix.Server/PicHistory/WdPicHistory.xaml
+4
-0
WdPicHistory.xaml.cs
...ick.Blowing.UI.Fix.Server/PicHistory/WdPicHistory.xaml.cs
+7
-1
AssemblyInfo.cs
...LY.Thick.Blowing.UI.Fix.Server/Properties/AssemblyInfo.cs
+2
-2
No files found.
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/PicHistory/PicHistory.cs
View file @
b082f6cf
...
...
@@ -68,6 +68,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
/// </summary>
public
bool
IsPercent
{
get
;
set
;
}
=
true
;
/// <summary>
/// 自动目标值
/// </summary>
public
bool
IsAutoTarget
{
get
;
set
;
}
#
endregion
#
region
状态
/// <summary>
...
...
@@ -162,10 +166,14 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
Id
=
0
,
Mix
=
1
},
async
(
object
asyncContext
,
object
retData
)
=>
(
object
asyncContext
,
object
retData
)
=>
{
Pack_GetFrameReponse
reponse
=
retData
as
Pack_GetFrameReponse
;
await
Add
(
reponse
);
//创建新线程跑下面的
Task
.
Factory
.
StartNew
((
obj
)
=>
{
Pack_GetFrameReponse
reponse
=
obj
as
Pack_GetFrameReponse
;
Add
(
reponse
);
},
retData
);
},
this
);
}
...
...
@@ -230,7 +238,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
ChartToImage
.
SaveToJpeg
(
scanGraph
,
path
);
}
public
async
Task
Add
(
Pack_GetFrameReponse
reponse
)
public
void
Add
(
Pack_GetFrameReponse
reponse
)
{
if
(
reponse
.
scanData
==
null
)
return
;
//没有数据
...
...
@@ -245,16 +253,13 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
//ALL
string
path
=
CreateCurrPath
(
reponse
.
scanData
.
EndTime
,
false
);
App
.
Current
.
MainWindow
.
Dispatcher
.
Invoke
(()
=>
timer
.
Dispatcher
.
Invoke
(()
=>
{
scanGraphVm
.
UpdateValue
(
reponse
,
isWarning
);
SavePic
(
path
);
});
await
Task
.
Factory
.
StartNew
(()
=>
{
try
{
if
(
isWarning
)
...
...
@@ -269,7 +274,6 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
{
return
;
}
});
}
...
...
@@ -338,13 +342,48 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
private
void
Keep
()
{
while
(
dateInRootPath
.
Count
>
KeepDay
)
{
try
{
string
dirpath
=
RootPath
+
@"\all\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy\\MM\\dd"
);
if
(
Directory
.
Exists
(
dirpath
))
{
Directory
.
Delete
(
dirpath
,
true
);
dirpath
=
RootPath
+
@"\iswarning\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy\\MM\\dd"
);
//检测上级文件夹,里面是空的,那就继续删除
dirpath
=
RootPath
+
@"\all\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy\\MM"
);
Directory
.
Delete
(
dirpath
);
dirpath
=
RootPath
+
@"\all\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy"
);
Directory
.
Delete
(
dirpath
);
}
}
catch
{
//删除不了。不管了。。。。
}
try
{
string
dirpath
=
RootPath
+
@"\iswarning\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy\\MM\\dd"
);
if
(
Directory
.
Exists
(
dirpath
))
{
Directory
.
Delete
(
dirpath
,
true
);
//检测上级文件夹,里面是空的,那就继续删除
dirpath
=
RootPath
+
@"\iswarning\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy\\MM"
);
Directory
.
Delete
(
dirpath
);
dirpath
=
RootPath
+
@"\iswarning\"
+
dateInRootPath
.
First
().
ToString
(
@"yyyy"
);
Directory
.
Delete
(
dirpath
);
}
}
catch
{
//删除不了。不管了。。。。
}
dateInRootPath
.
RemoveAt
(
0
);
}
CurrDays
=
dateInRootPath
.
Count
;
...
...
@@ -456,5 +495,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
/// Y轴%显示
/// </summary>
public
bool
IsPercent
{
get
;
set
;
}
=
true
;
/// <summary>
/// 自动目标值
/// </summary>
public
bool
IsAutoTarget
{
get
;
set
;
}
}
}
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/PicHistory/ScanGraphVm.cs
View file @
b082f6cf
...
...
@@ -256,6 +256,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
{
double
target
=
this
.
profileParam
.
Target
;
if
(
picHistory
.
IsAutoTarget
)
{
if
(!
double
.
IsNaN
(
Average
))
target
=
Average
;
}
double
tolerance
=
this
.
profileParam
.
TolerancePercent
*
target
;
Target
=
target
;
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/PicHistory/WdPicHistory.xaml
View file @
b082f6cf
...
...
@@ -91,6 +91,10 @@
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴%显示"/>
<CheckBox IsChecked="{Binding IsPercent}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="Y轴自动目标值"/>
<CheckBox IsChecked="{Binding IsAutoTarget}"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
<Button Style="{StaticResource Styles.Button.Square.Accent2}" Content="图片保存" Click="btnSavePicClick" Width="auto"/>
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/PicHistory/WdPicHistory.xaml.cs
View file @
b082f6cf
...
...
@@ -100,6 +100,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
/// </summary>
public
bool
IsPercent
{
get
;
set
;
}
=
true
;
/// <summary>
/// Y轴自动目标值
/// </summary>
public
bool
IsAutoTarget
{
get
;
set
;
}
public
RelayCommand
OkCmd
{
get
;
private
set
;
}
private
PicHistory
picHistory
;
public
PicHistory
PicHistory
=>
picHistory
;
...
...
@@ -121,6 +126,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
YRangePercent
=
picHistory
.
YRangePercent
;
IntervalMin
=
picHistory
.
IntervalMin
;
IsPercent
=
picHistory
.
IsPercent
;
IsAutoTarget
=
picHistory
.
IsAutoTarget
;
this
.
picHistory
=
picHistory
;
}
...
...
@@ -184,7 +190,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
picHistory
.
YRangePercent
=
YRangePercent
;
picHistory
.
IntervalMin
=
IntervalMin
;
picHistory
.
IsPercent
=
IsPercent
;
picHistory
.
IsAutoTarget
=
IsAutoTarget
;
picHistory
.
Save
();
MessageBox
.
Show
(
$"设置完成"
);
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server/Properties/AssemblyInfo.cs
View file @
b082f6cf
...
...
@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.34.
2
")]
[assembly: AssemblyFileVersion("6.34.
2
")]
[assembly: AssemblyVersion("6.34.
3
")]
[assembly: AssemblyFileVersion("6.34.
3
")]
[assembly: Guid("72FBA808-FA10-43BF-8504-C6E814E031E7")]
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