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
f58819f8
Commit
f58819f8
authored
May 16, 2022
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 吹膜测厚 可以设置 正方向 是 顺时针方向
parent
72e637f3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
510 additions
and
191 deletions
+510
-191
App.xaml
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/App.xaml
+3
-0
PgBlowing.xaml
...ick.Blowing/FLY.Thick.Blowing.UI/PgBlowing/PgBlowing.xaml
+8
-11
PgBlowingVm.cs
...ick.Blowing/FLY.Thick.Blowing.UI/PgBlowing/PgBlowingVm.cs
+104
-33
PgBlowingVmUt.cs
...k.Blowing/FLY.Thick.Blowing.UI/PgBlowing/PgBlowingVmUt.cs
+7
-1
DynAreaBlowing.xaml
...Blowing/FLY.Thick.Blowing.UI/UiModule/DynAreaBlowing.xaml
+4
-5
DynAreaBlowing.xaml.cs
...wing/FLY.Thick.Blowing.UI/UiModule/DynAreaBlowing.xaml.cs
+65
-31
PolarChart.xaml.cs
....Blowing.UI/UiModule/ScanGraphCircular/PolarChart.xaml.cs
+158
-66
ScanGraphCircularVm.cs
...wing.UI/UiModule/ScanGraphCircular/ScanGraphCircularVm.cs
+1
-0
BlowingServiceClient.cs
....Blowing/FLY.Thick.Blowing/Client/BlowingServiceClient.cs
+8
-1
IBlowingService.cs
...ick.Blowing/FLY.Thick.Blowing/IService/IBlowingService.cs
+7
-0
GM_BlowingFix.cs
...Y.Thick.Blowing/FLY.Thick.Blowing/Server/GM_BlowingFix.cs
+8
-0
App.xaml
...t.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/App.xaml
+3
-0
PgBlowing.xaml
...ingScan/FLY.Thick.BlowingScan.UI/PgBlowing/PgBlowing.xaml
+7
-4
PgBlowingVm.cs
...ingScan/FLY.Thick.BlowingScan.UI/PgBlowing/PgBlowingVm.cs
+103
-30
PgBlowingVmUt.cs
...gScan/FLY.Thick.BlowingScan.UI/PgBlowing/PgBlowingVmUt.cs
+7
-0
DynAreaBlowing.xaml
...can/FLY.Thick.BlowingScan.UI/UiModule/DynAreaBlowing.xaml
+4
-5
DynAreaBlowing.xaml.cs
.../FLY.Thick.BlowingScan.UI/UiModule/DynAreaBlowing.xaml.cs
+5
-4
GM_BlowingScan.cs
...lowingScan/FLY.Thick.BlowingScan/Server/GM_BlowingScan.cs
+8
-0
No files found.
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/App.xaml
View file @
f58819f8
...
...
@@ -5,6 +5,9 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox" />
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/PgBlowing/PgBlowing.xaml
View file @
f58819f8
...
...
@@ -19,12 +19,10 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:OnOffConverter x:Key="onOffConv"/>
<local:InNoConverter x:Key="inNoConv"/>
<local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/>
<local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False" IsForwCW="False" />
</ResourceDictionary>
</Page.Resources>
...
...
@@ -70,13 +68,12 @@
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="旋转方向" />
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock DataContext="{Binding DataContext,ElementName=grid_viewModel}">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldContent}">
<Setter Property="Text" Value="逆时针"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}
">
<DataTrigger Binding="{Binding
IsCW,Mode=OneWay}" Value="True
">
<Setter Property="Text" Value="顺时针"/>
</DataTrigger>
</Style.Triggers>
...
...
@@ -190,7 +187,7 @@
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="1号加热棒位置" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding No1InClock}"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding No1InClock
,StringFormat={}{0:#.#}
}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="点钟方向" />
</StackPanel>
</StackPanel>
...
...
@@ -225,10 +222,10 @@
<StackPanel >
<TextBlock Style="{StaticResource Styles.Card.Title}" Text="旋转"/>
<StackPanel Orientation="Horizontal">
</StackPanel
>
<StackPanel Orientation="Horizontal"
>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="正方向是顺时针方向" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsForwCW}"/
>
</StackPanel
>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="立式旋转" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding Is3D}"/>
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/PgBlowing/PgBlowingVm.cs
View file @
f58819f8
...
...
@@ -144,10 +144,19 @@ namespace FLY.Thick.Blowing.UI
/// 当人字架复位时,探头在右边
/// </summary>
public
bool
IsProbeRight
{
get
;
set
;
}
=
true
;
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
/// <summary>
/// 分区1号 对应时钟的位置 1 ~ 12
/// </summary>
public
int
No1InClock
{
get
;
set
;
}
=
3
;
public
double
No1InClock
{
get
;
set
;
}
=
3
;
/// <summary>
/// 使用分区表
/// </summary>
...
...
@@ -178,6 +187,8 @@ namespace FLY.Thick.Blowing.UI
return
false
;
}
}
public
bool
IsCW
{
get
;
private
set
;
}
#
endregion
#
region
Command
...
...
@@ -187,6 +198,7 @@ namespace FLY.Thick.Blowing.UI
public
IBlowingFixService
renZiJiaService
{
get
;
protected
set
;
}
public
IBlowingDetectService
bDetect
{
get
;
protected
set
;
}
bool
isSkipUpdateOrgBoltNo
=
false
;
public
PgBlowingVm
()
{
ApplyCmd
=
new
RelayCommand
(
Apply
);
...
...
@@ -225,7 +237,7 @@ namespace FLY.Thick.Blowing.UI
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
IsProbeRight
),
this
,
nameof
(
IsProbeRight
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
IsForwCW
),
this
,
nameof
(
IsForwCW
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
ChannelCnt
),
this
,
nameof
(
ChannelCnt
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
BPC
),
this
,
nameof
(
BPC
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
OrgBoltNo
),
this
,
nameof
(
OrgBoltNo
));
...
...
@@ -242,78 +254,136 @@ namespace FLY.Thick.Blowing.UI
});
updateNo1InClock
();
updateIsCW
();
this
.
PropertyChanged
+=
PgBlowingVm_PropertyChanged
;
bDetect
.
PropertyChanged
+=
BDetect_PropertyChanged
;
}
private
void
BDetect_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
nameof
(
bDetect
.
Direction
))
{
updateIsCW
();
}
}
void
updateIsCW
()
{
if
(
IsForwCW
)
{
IsCW
=
bDetect
.
Direction
==
Misc
.
DIRECTION
.
FORWARD
;
}
else
{
IsCW
=
bDetect
.
Direction
!=
Misc
.
DIRECTION
.
FORWARD
;
}
}
private
void
PgBlowingVm_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
((
e
.
PropertyName
==
nameof
(
No1InClock
))||
(
e
.
PropertyName
==
nameof
(
IsProbeRight
)))
if
((
e
.
PropertyName
==
nameof
(
No1InClock
))
||
(
e
.
PropertyName
==
nameof
(
IsProbeRight
)))
{
if
(
isSkipUpdate
)
return
;
isSkipUpdate
=
true
;
updateOrgBoltNo
();
isSkipUpdate
=
false
;
}
else
if
(
e
.
PropertyName
==
nameof
(
OrgBoltNo
))
{
if
(
isSkipUpdate
)
return
;
isSkipUpdate
=
true
;
else
if
((
e
.
PropertyName
==
nameof
(
OrgBoltNo
)))
{
updateNo1InClock
();
}
else
if
(
e
.
PropertyName
==
nameof
(
IsForwCW
))
{
updateIsCW
();
updateNo1InClock
();
isSkipUpdate
=
false
;
}
}
bool
isSkipUpdate
=
false
;
void
updateNo1InClock
()
void
updateNo1InClock
()
{
if
(
isSkipUpdateOrgBoltNo
)
return
;
double
orgBoltNo
=
OrgBoltNo
;
if
(
orgBoltNo
<
1
||
orgBoltNo
>
NBolts
)
orgBoltNo
=
1
;
int
no1
;
if
(
IsProbeRight
)
double
no1
;
if
(!
IsForwCW
)
{
no1
=
(
int
)
Math
.
Round
(
3
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
);
if
(
IsProbeRight
)
{
no1
=
Math
.
Round
(
3
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
else
{
no1
=
Math
.
Round
(
9
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
}
else
{
no1
=
(
int
)
Math
.
Round
(
9
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
);
if
(
IsProbeRight
)
{
no1
=
Math
.
Round
(
3
-
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
else
{
no1
=
Math
.
Round
(
9
-
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
}
if
(
no1
>
12
)
no1
-=
12
;
else
if
(
no1
<
1
)
else
if
(
no1
<
0
)
no1
+=
12
;
isSkipUpdateOrgBoltNo
=
true
;
No1InClock
=
no1
;
isSkipUpdateOrgBoltNo
=
false
;
}
void
updateOrgBoltNo
()
void
updateOrgBoltNo
()
{
if
(
isSkipUpdateOrgBoltNo
)
return
;
double
no1
=
No1InClock
;
if
(
no1
<
1
||
no1
>
12
)
if
(
no1
<
0
||
no1
>
12
)
no1
=
3
;
//平移,以3为0点
no1
-=
3
;
if
(
no1
<
0
)
no1
+=
12
;
int
orgBoltNo
;
if
(
IsProbeRight
)
if
(
!
IsForwCW
)
{
orgBoltNo
=
(
int
)
Math
.
Round
(
NBolts
*
no1
/
12
)
+
1
;
if
(
IsProbeRight
)
{
orgBoltNo
=
(
int
)
Math
.
Round
((
no1
-
3
)
*
NBolts
/
12
)
+
1
;
}
else
{
orgBoltNo
=
(
int
)
Math
.
Round
((
no1
-
9
)
*
NBolts
/
12
)
+
1
;
}
}
else
else
{
orgBoltNo
=
(
int
)
Math
.
Round
(
NBolts
*
(
no1
+
6
)
/
12
)
+
1
;
if
(
IsProbeRight
)
{
orgBoltNo
=
(
int
)
Math
.
Round
((
3
-
no1
)
*
NBolts
/
12
)
+
1
;
}
else
{
orgBoltNo
=
(
int
)
Math
.
Round
((
9
-
no1
)
*
NBolts
/
12
)
+
1
;
}
}
if
(
orgBoltNo
>
NBolts
)
orgBoltNo
-=
NBolts
;
else
if
(
orgBoltNo
<
1
)
else
if
(
orgBoltNo
<
1
)
orgBoltNo
+=
NBolts
;
isSkipUpdateOrgBoltNo
=
true
;
OrgBoltNo
=
orgBoltNo
;
isSkipUpdateOrgBoltNo
=
false
;
}
void
Download
()
...
...
@@ -411,6 +481,7 @@ namespace FLY.Thick.Blowing.UI
renZiJiaService
.
OrgBoltNo
=
this
.
OrgBoltNo
;
renZiJiaService
.
IsUsedMap
=
this
.
IsUsedMap
;
renZiJiaService
.
IsProbeRight
=
this
.
IsProbeRight
;
renZiJiaService
.
IsForwCW
=
this
.
IsForwCW
;
renZiJiaService
.
Apply
();
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"应用成功"
,
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/PgBlowing/PgBlowingVmUt.cs
View file @
f58819f8
...
...
@@ -274,7 +274,13 @@ namespace FLY.Thick.Blowing.UI
public
bool
IsProbeRight
{
get
;
set
;
}
public
BlowingType
BType
{
get
;
set
;
}
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
public
event
EventHandler
DataEvent
;
public
event
PropertyChangedEventHandler
PropertyChanged
;
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/UiModule/DynAreaBlowing.xaml
View file @
f58819f8
...
...
@@ -15,8 +15,7 @@
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:DynAreaBlowingVmUt x:Key="viewModel" Direction="FORWARD" Angle="200"/>
<local:Angle2CWConverter x:Key="angle2cwConv"/>
<local:DynAreaBlowingVm x:Key="viewModel" IsCW="False"/>
</ResourceDictionary>
</UserControl.Resources>
...
...
@@ -56,7 +55,7 @@
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="{Binding
Angle, Converter={StaticResource angle2cwConv}
}"/>
<RotateTransform Angle="{Binding
IconAngle
}"/>
<TranslateTransform/>
</TransformGroup>
</iconPacks:PackIconMaterial.RenderTransform>
...
...
@@ -64,7 +63,7 @@
<Style TargetType="iconPacks:PackIconMaterial">
<Setter Property="Kind" Value="RotateLeft"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}
">
<DataTrigger Binding="{Binding
IsCW}" Value="True
">
<Setter Property="Kind" Value="RotateRight"/>
</DataTrigger>
</Style.Triggers>
...
...
@@ -76,7 +75,7 @@
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Module.Text.ItemHeader}">
<Setter Property="Text" Value="逆时针"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}
">
<DataTrigger Binding="{Binding
IsCW}" Value="True
">
<Setter Property="Text" Value="顺时针"/>
</DataTrigger>
</Style.Triggers>
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/UiModule/DynAreaBlowing.xaml.cs
View file @
f58819f8
...
...
@@ -20,6 +20,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
public
partial
class
DynAreaBlowing
:
UserControl
{
IUnityContainer
container
;
DynAreaBlowingVm
viewModel
;
public
DynAreaBlowing
()
{
InitializeComponent
();
...
...
@@ -28,11 +29,14 @@ namespace FLY.Thick.Blowing.UI.UiModule
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
,
IBlowingService
blowingFixService
,
IBlowingDetectService
blowingDetectService
)
{
this
.
container
=
container
;
this
.
DataContext
=
blowingDetectService
;
viewModel
=
new
DynAreaBlowingVm
();
viewModel
.
Init
(
blowingFixService
,
blowingDetectService
);
this
.
DataContext
=
viewModel
;
}
private
void
Border_Blowing_Click
(
object
sender
,
RoutedEventArgs
e
)
...
...
@@ -41,16 +45,74 @@ namespace FLY.Thick.Blowing.UI.UiModule
MultiLayout
.
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
}
}
public
class
DynAreaBlowingVm
Ut
:
INotifyPropertyChanged
public
class
DynAreaBlowingVm
:
INotifyPropertyChanged
{
public
event
PropertyChangedEventHandler
PropertyChanged
;
public
double
Angle
{
get
;
set
;
}
=
-
170.2
;
public
Misc
.
DIRECTION
Direction
{
get
;
set
;
}
=
Misc
.
DIRECTION
.
FORWARD
;
public
double
IconAngle
{
get
;
set
;
}
=
170.2
;
//顺时针方向
public
bool
IsCW
{
get
;
set
;
}
=
true
;
public
TimeSpan
RenZiJiaPeriod
{
get
;
set
;
}
=
TimeSpan
.
FromMinutes
(
12.3
);
public
TimeSpan
PastTime
{
get
;
set
;
}
=
TimeSpan
.
FromMinutes
(
3.3
);
public
double
FilmVelocity
{
get
;
set
;
}
=
50.1
;
IBlowingService
blowingFixService
;
IBlowingDetectService
blowingDetectService
;
public
void
Init
(
IBlowingService
blowingFixService
,
IBlowingDetectService
blowingDetectService
)
{
this
.
blowingFixService
=
blowingFixService
;
this
.
blowingDetectService
=
blowingDetectService
;
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingDetectService
,
nameof
(
IBlowingDetectService
.
RenZiJiaPeriod
),
this
,
nameof
(
RenZiJiaPeriod
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingDetectService
,
nameof
(
IBlowingDetectService
.
PastTime
),
this
,
nameof
(
PastTime
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingDetectService
,
nameof
(
IBlowingDetectService
.
FilmVelocity
),
this
,
nameof
(
FilmVelocity
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingDetectService
,
nameof
(
IBlowingDetectService
.
Angle
),
this
,
nameof
(
Angle
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingDetectService
,
nameof
(
IBlowingDetectService
.
Angle
),
updateIconAngle
);
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingDetectService
,
nameof
(
IBlowingDetectService
.
Direction
),
updateIsCW
);
Misc
.
BindingOperations
.
SetBinding
(
this
.
blowingFixService
,
nameof
(
IBlowingService
.
IsForwCW
),
()=>
{
updateIconAngle
();
updateIsCW
();
});
}
void
updateIconAngle
()
{
if
(
blowingFixService
.
IsForwCW
)
{
IconAngle
=
blowingDetectService
.
Angle
;
}
else
{
IconAngle
=
-
blowingDetectService
.
Angle
;
}
}
void
updateIsCW
()
{
if
(
blowingFixService
.
IsForwCW
)
{
IsCW
=
blowingDetectService
.
Direction
==
Misc
.
DIRECTION
.
FORWARD
;
}
else
{
IsCW
=
blowingDetectService
.
Direction
!=
Misc
.
DIRECTION
.
FORWARD
;
}
}
}
public
class
UiModule2_DynAreaBlowing
:
MultiLayout
.
UiModule
.
IUiModule2
{
/// <summary>
...
...
@@ -93,32 +155,4 @@ namespace FLY.Thick.Blowing.UI.UiModule
}
}
public
class
Angle2CWConverter
:
IValueConverter
{
#
region
IValueConverter
成员
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
System
.
Globalization
.
CultureInfo
culture
)
{
if
(!(
value
is
double
)
&&
!(
value
is
int
)
)
{
return
null
;
}
int
angle
=
System
.
Convert
.
ToInt32
(
value
);
return
-
angle
;
}
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
throw
new
NotImplementedException
();
}
#
endregion
}
}
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/UiModule/ScanGraphCircular/PolarChart.xaml.cs
View file @
f58819f8
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI/UiModule/ScanGraphCircular/ScanGraphCircularVm.cs
View file @
f58819f8
...
...
@@ -119,6 +119,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
graph
.
SetBinding
(
PolarChart
.
BPCProperty
,
new
Binding
(
nameof
(
blowingService
.
BPC
))
{
Source
=
blowingService
});
graph
.
SetBinding
(
PolarChart
.
OrgBoltNoProperty
,
new
Binding
(
nameof
(
blowingService
.
OrgBoltNo
))
{
Source
=
blowingService
});
graph
.
SetBinding
(
PolarChart
.
MPIsRightProperty
,
new
Binding
(
nameof
(
blowingService
.
IsProbeRight
))
{
Source
=
blowingService
});
graph
.
SetBinding
(
PolarChart
.
IsForwCWProperty
,
new
Binding
(
nameof
(
blowingService
.
IsForwCW
))
{
Source
=
blowingService
});
paramDictionary
.
SetBinding
(
this
,
nameof
(
XStep
),
5
);
graph
.
SetBinding
(
PolarChart
.
XStepProperty
,
new
Binding
(
nameof
(
XStep
))
{
Source
=
this
});
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Client/BlowingServiceClient.cs
View file @
f58819f8
...
...
@@ -56,7 +56,14 @@ namespace FLY.Thick.Blowing.Client
/// 测厚仪类型, 追边 or 扫描
/// </summary>
public
BlowingType
BType
{
get
;
set
;
}
public
bool
IsProbeRight
{
get
;
set
;
}
public
bool
IsProbeRight
{
get
;
set
;
}
=
true
;
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
#
endregion
/// <summary>
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/IService/IBlowingService.cs
View file @
f58819f8
...
...
@@ -43,6 +43,13 @@ namespace FLY.Thick.Blowing.IService
BoltMapCell
[]
Map
{
get
;
set
;
}
#
endregion
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
bool
IsForwCW
{
get
;
set
;
}
/// <summary>
/// 测厚仪测量点位置方向:Left, Right (也就是三角形在左还是右)
/// </summary>
...
...
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/GM_BlowingFix.cs
View file @
f58819f8
...
...
@@ -121,6 +121,13 @@ namespace FLY.Thick.Blowing.Server
/// </summary>
public
bool
IsProbeRight
{
get
;
set
;
}
=
true
;
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
/// <summary>
/// 应用
/// </summary>
...
...
@@ -1596,6 +1603,7 @@ namespace FLY.Thick.Blowing.Server
public
bool
IsUsedMap
;
public
BoltMapCell
[]
Map
;
public
bool
IsProbeRight
=
true
;
public
bool
IsForwCW
;
}
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/App.xaml
View file @
f58819f8
...
...
@@ -5,6 +5,9 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox" />
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/PgBlowing/PgBlowing.xaml
View file @
f58819f8
...
...
@@ -69,13 +69,12 @@
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="旋转方向" />
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock DataContext="{Binding DataContext,ElementName=grid_viewModel}">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldContent}">
<Setter Property="Text" Value="逆时针"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}
">
<DataTrigger Binding="{Binding
IsCW,Mode=OneWay}" Value="True
">
<Setter Property="Text" Value="顺时针"/>
</DataTrigger>
</Style.Triggers>
...
...
@@ -189,7 +188,7 @@
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="1号加热棒位置" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding No1InClock}"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding No1InClock
,StringFormat={}{0:#.#}
}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="点钟方向" />
</StackPanel>
</StackPanel>
...
...
@@ -265,6 +264,10 @@
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="正方向是顺时针方向" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsForwCW}"/>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="立式旋转" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding Is3D}"/>
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/PgBlowing/PgBlowingVm.cs
View file @
f58819f8
...
...
@@ -143,10 +143,18 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// </summary>
public
bool
IsProbeRight
{
get
;
set
;
}
=
true
;
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
/// <summary>
/// 分区1号 对应时钟的位置 1 ~ 12
/// </summary>
public
int
No1InClock
{
get
;
set
;
}
=
3
;
public
double
No1InClock
{
get
;
set
;
}
=
3
;
/// <summary>
/// 使用分区表
/// </summary>
...
...
@@ -197,6 +205,8 @@ namespace FLY.Thick.BlowingScan.UI.Client
return
false
;
}
}
public
bool
IsCW
{
get
;
private
set
;
}
#
endregion
...
...
@@ -209,6 +219,8 @@ namespace FLY.Thick.BlowingScan.UI.Client
public
IBlowingDetectService
bDetect
{
get
;
protected
set
;
}
public
IInitParamService
initParamService
{
get
;
protected
set
;
}
bool
isSkipUpdateOrgBoltNo
=
false
;
public
PgBlowingVm
()
{
ApplyCmd
=
new
RelayCommand
(
Apply
);
...
...
@@ -248,6 +260,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
Misc
.
BindingOperations
.
SetBinding
(
bDetect
,
nameof
(
bDetect
.
InNo_Roll
),
this
,
nameof
(
InNo_Roll
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
IsProbeRight
),
this
,
nameof
(
IsProbeRight
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
IsForwCW
),
this
,
nameof
(
IsForwCW
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
ChannelCnt
),
this
,
nameof
(
ChannelCnt
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
BPC
),
this
,
nameof
(
BPC
));
Misc
.
BindingOperations
.
SetBinding
(
renZiJiaService
,
nameof
(
renZiJiaService
.
OrgBoltNo
),
this
,
nameof
(
OrgBoltNo
));
...
...
@@ -270,80 +283,141 @@ namespace FLY.Thick.BlowingScan.UI.Client
updateNo1InClock
();
updateIsCW
();
this
.
PropertyChanged
+=
PgBlowingVm_PropertyChanged
;
bDetect
.
PropertyChanged
+=
BDetect_PropertyChanged
;
}
private
void
BDetect_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
nameof
(
bDetect
.
Direction
))
{
updateIsCW
();
}
}
void
updateIsCW
()
{
if
(
IsForwCW
)
{
IsCW
=
bDetect
.
Direction
==
Misc
.
DIRECTION
.
FORWARD
;
}
else
{
IsCW
=
bDetect
.
Direction
!=
Misc
.
DIRECTION
.
FORWARD
;
}
}
private
void
PgBlowingVm_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
((
e
.
PropertyName
==
nameof
(
No1InClock
))
||
(
e
.
PropertyName
==
nameof
(
IsProbeRight
)))
{
if
(
isSkipUpdate
)
return
;
isSkipUpdate
=
true
;
updateOrgBoltNo
();
isSkipUpdate
=
false
;
updateOrgBoltNo
();
}
else
if
(
e
.
PropertyName
==
nameof
(
OrgBoltNo
))
else
if
(
(
e
.
PropertyName
==
nameof
(
OrgBoltNo
)
))
{
if
(
isSkipUpdate
)
return
;
isSkipUpdate
=
true
;
updateNo1InClock
();
isSkipUpdate
=
false
;
}
else
if
(
e
.
PropertyName
==
nameof
(
IsForwCW
))
{
updateIsCW
();
updateNo1InClock
();
}
}
bool
isSkipUpdate
=
false
;
void
updateNo1InClock
()
{
if
(
isSkipUpdateOrgBoltNo
)
return
;
double
orgBoltNo
=
OrgBoltNo
;
if
(
orgBoltNo
<
1
||
orgBoltNo
>
NBolts
)
orgBoltNo
=
1
;
int
no1
;
if
(
IsProbeRight
)
double
no1
;
if
(!
IsForwCW
)
{
no1
=
(
int
)
Math
.
Round
(
3
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
);
if
(
IsProbeRight
)
{
no1
=
Math
.
Round
(
3
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
else
{
no1
=
Math
.
Round
(
9
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
}
else
{
no1
=
(
int
)
Math
.
Round
(
9
+
12
*
(
orgBoltNo
-
1
)
/
NBolts
);
if
(
IsProbeRight
)
{
no1
=
Math
.
Round
(
3
-
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
else
{
no1
=
Math
.
Round
(
9
-
12
*
(
orgBoltNo
-
1
)
/
NBolts
,
1
);
}
}
if
(
no1
>
12
)
no1
-=
12
;
else
if
(
no1
<
1
)
else
if
(
no1
<
0
)
no1
+=
12
;
isSkipUpdateOrgBoltNo
=
true
;
No1InClock
=
no1
;
isSkipUpdateOrgBoltNo
=
false
;
}
void
updateOrgBoltNo
()
{
if
(
isSkipUpdateOrgBoltNo
)
return
;
double
no1
=
No1InClock
;
if
(
no1
<
1
||
no1
>
12
)
if
(
no1
<
0
||
no1
>
12
)
no1
=
3
;
//平移,以3为0点
no1
-=
3
;
if
(
no1
<
0
)
no1
+=
12
;
int
orgBoltNo
;
if
(
IsProbeRight
)
if
(
!
IsForwCW
)
{
orgBoltNo
=
(
int
)
Math
.
Round
(
NBolts
*
no1
/
12
)
+
1
;
if
(
IsProbeRight
)
{
orgBoltNo
=
(
int
)
Math
.
Round
((
no1
-
3
)
*
NBolts
/
12
)
+
1
;
}
else
{
orgBoltNo
=
(
int
)
Math
.
Round
((
no1
-
9
)
*
NBolts
/
12
)
+
1
;
}
}
else
{
orgBoltNo
=
(
int
)
Math
.
Round
(
NBolts
*
(
no1
+
6
)
/
12
)
+
1
;
if
(
IsProbeRight
)
{
orgBoltNo
=
(
int
)
Math
.
Round
((
3
-
no1
)
*
NBolts
/
12
)
+
1
;
}
else
{
orgBoltNo
=
(
int
)
Math
.
Round
((
9
-
no1
)
*
NBolts
/
12
)
+
1
;
}
}
if
(
orgBoltNo
>
NBolts
)
orgBoltNo
-=
NBolts
;
else
if
(
orgBoltNo
<
1
)
orgBoltNo
+=
NBolts
;
isSkipUpdateOrgBoltNo
=
true
;
OrgBoltNo
=
orgBoltNo
;
isSkipUpdateOrgBoltNo
=
false
;
}
void
Download
()
{
IsBufListLoading
=
true
;
...
...
@@ -453,12 +527,11 @@ namespace FLY.Thick.BlowingScan.UI.Client
renZiJiaService
.
OrgBoltNo
=
this
.
OrgBoltNo
;
renZiJiaService
.
IsUsedMap
=
this
.
IsUsedMap
;
renZiJiaService
.
IsProbeRight
=
this
.
IsProbeRight
;
renZiJiaService
.
IsForwCW
=
this
.
IsForwCW
;
renZiJiaService
.
Smooth
=
this
.
Smooth
;
renZiJiaService
.
SensorWidth
=
this
.
SensorWidth
;
renZiJiaService
.
SolveCnt
=
this
.
SolveCnt
;
renZiJiaService
.
Apply
();
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"应用成功"
,
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/PgBlowing/PgBlowingVmUt.cs
View file @
f58819f8
...
...
@@ -273,6 +273,13 @@ namespace FLY.Thick.BlowingScan.UI.Client
public
bool
IsUsedMap
{
get
;
set
;
}
public
BoltMapCell
[]
Map
{
get
;
set
;
}
public
bool
IsProbeRight
{
get
;
set
;
}
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
public
BlowingType
BType
{
get
;
set
;
}
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/UiModule/DynAreaBlowing.xaml
View file @
f58819f8
...
...
@@ -15,8 +15,7 @@
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:DynAreaBlowingVmUt x:Key="viewModel" Direction="BACKWARD" Angle="120"/>
<local:Angle2CWConverter x:Key="angle2cwConv"/>
<local:DynAreaBlowingVm x:Key="viewModel" IsCW="False"/>
</ResourceDictionary>
</UserControl.Resources>
...
...
@@ -45,7 +44,7 @@
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="{Binding
Angle, Converter={StaticResource angle2cwConv}
}"/>
<RotateTransform Angle="{Binding
IconAngle
}"/>
<TranslateTransform/>
</TransformGroup>
</iconPacks:PackIconMaterial.RenderTransform>
...
...
@@ -53,7 +52,7 @@
<Style TargetType="iconPacks:PackIconMaterial">
<Setter Property="Kind" Value="RotateLeft"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}
">
<DataTrigger Binding="{Binding
IsCW}" Value="True
">
<Setter Property="Kind" Value="RotateRight"/>
</DataTrigger>
</Style.Triggers>
...
...
@@ -65,7 +64,7 @@
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Module.Text.ItemHeader}">
<Setter Property="Text" Value="逆时针"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}
">
<DataTrigger Binding="{Binding
IsCW}" Value="True
">
<Setter Property="Text" Value="顺时针"/>
</DataTrigger>
</Style.Triggers>
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI/UiModule/DynAreaBlowing.xaml.cs
View file @
f58819f8
...
...
@@ -12,9 +12,8 @@ namespace FLY.Thick.BlowingScan.UI.Client.UiModule
/// </summary>
public
partial
class
DynAreaBlowing
:
UserControl
{
IBlowingScanService
blowingScanService
;
IBlowingDetectService
blowingDetectService
;
IUnityContainer
container
;
FLY
.
Thick
.
Blowing
.
UI
.
UiModule
.
DynAreaBlowingVm
viewModel
;
public
DynAreaBlowing
()
{
...
...
@@ -24,12 +23,14 @@ namespace FLY.Thick.BlowingScan.UI.Client.UiModule
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
,
IBlowingService
blowingFixService
,
IBlowingDetectService
blowingDetectService
)
{
this
.
container
=
container
;
this
.
blowingDetectService
=
blowingDetectService
;
this
.
DataContext
=
blowingDetectService
;
viewModel
=
new
FLY
.
Thick
.
Blowing
.
UI
.
UiModule
.
DynAreaBlowingVm
();
viewModel
.
Init
(
blowingFixService
,
blowingDetectService
);
this
.
DataContext
=
viewModel
;
}
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan/Server/GM_BlowingScan.cs
View file @
f58819f8
...
...
@@ -752,6 +752,14 @@ namespace FLY.Thick.BlowingScan.Server
/// </summary>
public
bool
IsProbeRight
{
get
;
set
;
}
=
true
;
/// <summary>
/// 正方向是顺时钟;
/// 信号0->信号1 为正方向;
/// 风环加热棒排列方向为 正方向;
/// 默认情况 风环加热棒排列是逆时钟
/// </summary>
public
bool
IsForwCW
{
get
;
set
;
}
/// <summary>
/// 应用
/// </summary>
...
...
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