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
5fa1d1b4
Commit
5fa1d1b4
authored
Apr 08, 2020
by
LiGuohua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加“应用”功能
parent
3a906c73
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
234 additions
and
24 deletions
+234
-24
FLY.HeatingHelper.UI.csproj
...lyst.Fix/FLY.HeatingHelper.UI/FLY.HeatingHelper.UI.csproj
+16
-0
DLG_GetSaveSwitches.xaml
....UI/UIModule/Dlg_GetSaveSwitches/DLG_GetSaveSwitches.xaml
+31
-0
DLG_GetSaveSwitches.xaml.cs
.../UIModule/Dlg_GetSaveSwitches/DLG_GetSaveSwitches.xaml.cs
+41
-0
VM_GetSaveSwitches.cs
...per.UI/UIModule/Dlg_GetSaveSwitches/VM_GetSaveSwitches.cs
+38
-0
UC_AirRingShift.xaml
...st.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml
+33
-2
UC_AirRingShift.xaml.cs
...Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml.cs
+71
-18
ThickHeatData.cs
...Y.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData.cs
+4
-4
No files found.
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/FLY.HeatingHelper.UI.csproj
View file @
5fa1d1b4
...
...
@@ -104,6 +104,10 @@
<DependentUpon>
App.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Converter\ValueConverters.cs"
/>
<Compile
Include=
"UiModule\Dlg_GetSaveSwitches\DLG_GetSaveSwitches.xaml.cs"
>
<DependentUpon>
DLG_GetSaveSwitches.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UiModule\Dlg_GetSaveSwitches\VM_GetSaveSwitches.cs"
/>
<Compile
Include=
"UiModule\HeatThickDetector\HeatThickDetector.xaml.cs"
>
<DependentUpon>
HeatThickDetector.xaml
</DependentUpon>
</Compile>
...
...
@@ -146,6 +150,10 @@
<DependentUpon>
MainWindow.xaml
</DependentUpon>
<SubType>
Code
</SubType>
</Compile>
<Page
Include=
"UiModule\Dlg_GetSaveSwitches\DLG_GetSaveSwitches.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"UiModule\HeatThickDetector\HeatThickDetector.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
...
...
@@ -207,6 +215,10 @@
<None
Include=
"App.config"
/>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\Project.FLY.FeedbackRenZiJia\FLY.FeedbackRenZiJia\FLY.FeedbackRenZiJia.csproj"
>
<Project>
{3faf02de-b9e8-4dda-a8e4-7a99e6e53acb}
</Project>
<Name>
FLY.FeedbackRenZiJia
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\Project.FLY.Thick.Blowing\FLY.Thick.Blowing\FLY.Thick.Blowing.csproj"
>
<Project>
{cc20abeb-59f6-492b-a963-51121eb5ae66}
</Project>
<Name>
FLY.Thick.Blowing
</Name>
...
...
@@ -223,6 +235,10 @@
<Project>
{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}
</Project>
<Name>
Misc
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\thick_public\Project.FLY.Thick.Base\FLY.Thick.Base.UI\FLY.Thick.Base.UI.csproj"
>
<Project>
{ec84265e-4196-4834-8ac0-81956777c5e9}
</Project>
<Name>
FLY.Thick.Base.UI
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\FLY.HeatingHelper\FLY.HeatingHelper.csproj"
>
<Project>
{973f0eed-3181-4fb9-abd6-196a9e816b77}
</Project>
<Name>
FLY.HeatingHelper
</Name>
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/Dlg_GetSaveSwitches/DLG_GetSaveSwitches.xaml
0 → 100644
View file @
5fa1d1b4
<Window x:Class="FLY.HeatingHelper.UI.UiModule.Dlg_GetSaveSwitches.DLG_GetSaveSwitches"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:FLY.HeatingHelper.UI.UiModule.Dlg_GetSaveSwitches"
mc:Ignorable="d"
Title="DLG_GetSaveSwitches" Height="256" Width="300">
<Grid Margin="0,0,0,-21">
<Grid.Resources>
<Style TargetType="CheckBox">
<Style.Setters>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Margin" Value="5,5"/>
</Style.Setters>
</Style>
</Grid.Resources>
<StackPanel Orientation="Vertical" Margin="20,20">
<TextBlock Text="请选择要应用的项目:" FontSize="20"/>
<CheckBox Content="复位分区" IsChecked="{Binding ResetBoltSave}" HorizontalAlignment="Left"/>
<CheckBox Content="旋转角度" IsChecked="{Binding RAngleSave}" HorizontalAlignment="Left"/>
<CheckBox Content="比例系数" IsChecked="{Binding KpSave}" HorizontalAlignment="Left"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,15">
<Button Content="应 用" HorizontalAlignment="Right" MinWidth="80" Command="{Binding Apply}" Click="Button_Click"/>
<Button Content="取 消" HorizontalAlignment="Right" MinWidth="80" Command="{Binding Cancel}"
Click="Button_Click"
Margin="10,0,0,0"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/Dlg_GetSaveSwitches/DLG_GetSaveSwitches.xaml.cs
0 → 100644
View file @
5fa1d1b4
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Shapes
;
using
Unity
;
namespace
FLY.HeatingHelper.UI.UiModule.Dlg_GetSaveSwitches
{
/// <summary>
/// DLG_GetSaveSwitches.xaml 的交互逻辑
/// </summary>
public
partial
class
DLG_GetSaveSwitches
:
Window
{
public
DLG_GetSaveSwitches
()
{
InitializeComponent
();
}
public
VM_GetSaveSwitches
vm
;
[
InjectionMethod
]
public
void
Init
(
VM_GetSaveSwitches
vm
)
{
this
.
vm
=
vm
;
DataContext
=
this
.
vm
;
}
private
void
Button_Click
(
object
sender
,
RoutedEventArgs
e
)
{
Close
();
}
}
}
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/Dlg_GetSaveSwitches/VM_GetSaveSwitches.cs
0 → 100644
View file @
5fa1d1b4
using
GalaSoft.MvvmLight.Command
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
FLY.HeatingHelper.UI.UiModule.Dlg_GetSaveSwitches
{
public
class
VM_GetSaveSwitches
:
INotifyPropertyChanged
{
public
bool
ResetBoltSave
{
get
;
set
;
}
=
true
;
public
bool
RAngleSave
{
get
;
set
;
}
=
false
;
public
bool
KpSave
{
get
;
set
;
}
=
false
;
public
bool
IsCancel
=
false
;
public
RelayCommand
Apply
{
get
;
set
;
}
private
void
Command_Apply
()
{
IsCancel
=
false
;
}
public
RelayCommand
Cancel
{
get
;
set
;
}
private
void
Command_Cancel
()
{
IsCancel
=
true
;
}
public
VM_GetSaveSwitches
()
{
Apply
=
new
RelayCommand
(
Command_Apply
);
Cancel
=
new
RelayCommand
(
Command_Cancel
);
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
}
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml
View file @
5fa1d1b4
...
...
@@ -187,7 +187,15 @@
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="旋转角度:" Style="{StaticResource textblock}" />
<TextBlock Text="{Binding RotAngle,StringFormat={}{0:f1}}" Style="{StaticResource textblock}" />
<TextBlock Style="{StaticResource textblock}">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0:f1}({1:f1})">
<Binding Path="RotAngle"/>
<Binding Path="CurrentAngle"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Button Click="Angle_Add" >
...
...
@@ -202,6 +210,12 @@
<iconPacks:PackIconIonicons Kind="ArrowDropdownMD" Margin="8,3,0,0"/>
</StackPanel>
</Button>
<Button Click="Angle_Reset" >
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="BackupRestore" VerticalAlignment="Center" Margin="5,0,0,0"/>
<TextBlock Text="当前值" />
</StackPanel>
</Button>
<!--<Button Click="Search_Angle" Width="120">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconEntypo Kind="BackInTime" VerticalAlignment="Center" Margin="5,0,0,0"/>
...
...
@@ -209,10 +223,27 @@
</StackPanel>
</Button>-->
</StackPanel>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="比例系数:" Style="{StaticResource textblock}" />
<TextBlock Style="{StaticResource textblock}">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0:f2}({1:f2})">
<Binding Path="Kp"/>
<Binding Path="CurrentKp"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</StackPanel>
</Grid>
</DockPanel>
<StackPanel DockPanel.Dock="Right">
<Button Content="应用" Height="241" Width="50" Margin="0,15"/>
<Button Content="应用" Height="241" Width="50" Margin="0,15"
Command="{Binding Apply}"
/>
</StackPanel>
</DockPanel>
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml.cs
View file @
5fa1d1b4
...
...
@@ -19,6 +19,7 @@ using MathNet.Numerics.LinearAlgebra.Double;
using
LiveCharts.Wpf
;
using
System.Globalization
;
using
Unity
;
using
GalaSoft.MvvmLight.Command
;
namespace
FLY.HeatingHelper.UI.UiModule
{
...
...
@@ -95,8 +96,14 @@ namespace FLY.HeatingHelper.UI.UiModule
mainVM
.
Change_Angle
(
0.5
);
}
private
void
Search_Angle
(
object
sender
,
RoutedEventArgs
e
)
private
void
Button_Click
(
object
sender
,
RoutedEventArgs
e
)
{
}
private
void
Angle_Reset
(
object
sender
,
RoutedEventArgs
e
)
{
mainVM
.
RotAngle
=
mainVM
.
CurrentAngle
;
}
}
...
...
@@ -104,16 +111,21 @@ namespace FLY.HeatingHelper.UI.UiModule
{
[
InjectionMethod
]
public
void
Initilize
(
FLY
.
Thick
.
Blowing
.
IService
.
IBlowingService
blowingService
,
FLY
.
FeedbackRenZiJia
.
IService
.
IHeatCellService
heatCellService
,
FLY
.
Thick
.
Blowing
.
IService
.
IBlowingDetectService
blowingDetectService
)
{
blowing
=
blowingService
;
bDetect
=
blowingDetectService
;
this
.
heatCellService
=
heatCellService
;
Misc
.
BindingOperations
.
SetBinding
(
blowing
,
"OrgBoltNo"
,
this
,
"CurrentResetBolt"
);
Misc
.
BindingOperations
.
SetBinding
(
bDetect
,
"RAngle"
,
this
,
"CurrentAngle"
);
Misc
.
BindingOperations
.
SetBinding
(
this
.
heatCellService
,
"Kp"
,
this
,
"CurrentKp"
);
Apply
=
new
RelayCommand
(
Command_Apply
);
}
FLY
.
Thick
.
Blowing
.
IService
.
IBlowingService
blowing
;
FLY
.
Thick
.
Blowing
.
IService
.
IBlowingDetectService
bDetect
;
FLY
.
FeedbackRenZiJia
.
IService
.
IHeatCellService
heatCellService
;
public
UC_FramePickerViewModel
vm1
=
new
UC_FramePickerViewModel
();
public
UC_FramePickerViewModel
vm2
=
new
UC_FramePickerViewModel
();
...
...
@@ -121,6 +133,9 @@ namespace FLY.HeatingHelper.UI.UiModule
public
int
CurrentResetBolt
{
get
;
set
;
}
public
double
CurrentAngle
{
get
;
set
;
}
public
double
CurrentKp
{
get
;
set
;
}
public
double
Kp
{
get
;
set
;
}
public
int
LockFrames
{
get
;
set
;
}
=
1
;
public
bool
LockAngle
{
get
;
set
;
}
=
true
;
...
...
@@ -133,6 +148,38 @@ namespace FLY.HeatingHelper.UI.UiModule
public
double
[]
DS_vthick
{
get
;
protected
set
;
}
=
null
;
public
double
[]
DS_vheat
{
get
;
protected
set
;
}
=
null
;
public
RelayCommand
Apply
{
get
;
set
;
}
private
void
Command_Apply
()
{
if
(!
FLY
.
Thick
.
Base
.
UI
.
WdPassword
.
Authorize
(
"Blowing"
))
return
;
var
dlg
=
new
Dlg_GetSaveSwitches
.
DLG_GetSaveSwitches
();
var
vm
=
new
Dlg_GetSaveSwitches
.
VM_GetSaveSwitches
();
dlg
.
Init
(
vm
);
dlg
.
ShowDialog
();
if
(
vm
.
IsCancel
)
return
;
if
(
vm
.
ResetBoltSave
)
{
blowing
.
OrgBoltNo
=
NewResetBolt
;
blowing
.
Apply
();
}
if
(
vm
.
RAngleSave
)
{
bDetect
.
RAngle
=
RotAngle
;
bDetect
.
Apply
();
}
if
(
vm
.
KpSave
)
{
heatCellService
.
Kp
=
Kp
;
heatCellService
.
Apply
();
}
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"应用成功"
,
null
,
TimeSpan
.
FromSeconds
(
2
));
}
private
IThickHeatData
_data
;
private
int
_NewResetBolt
=
0
;
...
...
@@ -146,6 +193,11 @@ namespace FLY.HeatingHelper.UI.UiModule
{
if
(
_NewResetBolt
!=
value
)
{
if
(
vth1
is
null
)
{
_NewResetBolt
=
value
;
return
;
}
int
cnt
=
vth1
.
Count
();
if
(
cnt
>
0
)
{
...
...
@@ -178,19 +230,19 @@ namespace FLY.HeatingHelper.UI.UiModule
}
}
}
private
int
_resetBolt
;
public
int
ResetBolt
{
get
{
return
_resetBolt
;
}
set
{
if
(
_resetBolt
!=
value
)
{
_resetBolt
=
value
;
UpdateVarChart
();
}
}
}
//
private int _resetBolt;
//
public int ResetBolt
//
{
//
get { return _resetBolt; }
//
set
//
{
//
if (_resetBolt != value)
//
{
//
_resetBolt = value;
//
UpdateVarChart();
//
}
//
}
//
}
public
UC_AirRingShiftViewModel
()
{
...
...
@@ -214,9 +266,9 @@ namespace FLY.HeatingHelper.UI.UiModule
//var tmpVM = ViewModel_HeatDetector.Instance;
//tmpVM.PropertyChanged += DataSelecter_PropertyChanged;
//CurrentAngle = bDetect.Angle;
CurrentAngle
=
bDetect
.
RAngle
;
CurrentResetBolt
=
blowing
.
OrgBoltNo
;
RotAngle
=
CurrentAngle
;
RotAngle
=
CurrentAngle
=
bDetect
.
RAngle
;
NewResetBolt
=
CurrentResetBolt
=
blowing
.
OrgBoltNo
;
Kp
=
CurrentKp
=
heatCellService
.
Kp
;
vm1
.
OnLoaded
(
true
);
vm2
.
OnLoaded
();
...
...
@@ -468,6 +520,7 @@ namespace FLY.HeatingHelper.UI.UiModule
vm1
.
SelectedFrame
=
result
.
frameIdx2
;
NewResetBolt
=
result
.
frameShift
;
TandH_Corel
=
result
.
similarity
;
Kp
=
result
.
ThickToHeatFactor
;
//rb += AirRingShift;
//while (rb >= _data.BoltCnt) rb -= _data.BoltCnt;
//while (rb < 0) rb += _data.BoltCnt;
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData.cs
View file @
5fa1d1b4
...
...
@@ -792,7 +792,7 @@ namespace FLY.HeatingHelper
}
// Step 7
return
sumh
/
(
sumt
/
thickmean
);
return
sumh
/
(
sumt
*
100
/
thickmean
);
}
protected
double
[]
RemoveNaN
(
double
[]
dat
)
...
...
@@ -1356,9 +1356,9 @@ namespace FLY.HeatingHelper
result
.
similarity
=
maxcorel
;
result
.
deltaAngle
=
deltaAngle
;
var
angle
=
GetRotAngleByIndex
(
idx1
)
+
deltaAngle
;
var
heat
=
DataHelper
.
VectorSub
(
GetHeatsByIndex
(
idx
2
,
-
1
,
-
1
),
GetHeatsByIndex
(
idx1
,
-
1
,
-
1
));
var
heat
=
DataHelper
.
VectorSub
(
GetHeatsByIndex
(
idx
1
,
-
1
,
-
1
),
GetHeatsByIndex
(
idx2
,
-
1
,
-
1
));
var
t1
=
GetThicksByIndex
(
idx1
,
1
,
angle
);
var
th
=
DataHelper
.
VectorSub
(
t1
,
GetThicksByIndex
(
idx2
,
1
,
angle
)
);
var
th
=
DataHelper
.
VectorSub
(
GetThicksByIndex
(
idx2
,
1
,
angle
),
t1
);
result
.
ThickToHeatFactor
=
CalculateHeatToThickFactor
(
heat
,
th
,
MathNet
.
Numerics
.
Statistics
.
Statistics
.
Mean
(
t1
));
});
...
...
@@ -1487,7 +1487,7 @@ namespace FLY.HeatingHelper
tmp
.
Add
(
evt
);
}
},
int
.
MaxValue
,
10
,
tru
e
,
false
);
int
.
MaxValue
,
10
,
fals
e
,
false
);
var
r
=
SearchFeaturedBoltsItem
(
thickClasses
[
0
].
from
,
thickClasses
[
0
].
to
,
newitems
,
5
,
100
,
5
,
5
,
5
);
if
(
r
!=
null
)
{
...
...
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