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
a269f6c1
Commit
a269f6c1
authored
Mar 12, 2020
by
冯伟球
Browse files
Options
Browse Files
Download
Plain Diff
界面添加了新功能,进行合拼
parents
dc44a484
694bf397
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
186 additions
and
135 deletions
+186
-135
FLY.HeatingHelper.UI.csproj
...lyst.Fix/FLY.HeatingHelper.UI/FLY.HeatingHelper.UI.csproj
+4
-0
UC_AirRingShift.xaml
...st.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml
+2
-0
UC_AirRingShift.xaml.cs
...Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml.cs
+3
-3
UC_FramePicker.xaml
...yst.Fix/FLY.HeatingHelper.UI/UIModule/UC_FramePicker.xaml
+35
-20
UC_FramePicker.xaml.cs
....Fix/FLY.HeatingHelper.UI/UIModule/UC_FramePicker.xaml.cs
+58
-95
UC_HeatBoltAnalystViewModel.cs
....HeatingHelper.UI/UIModule/UC_HeatBoltAnalystViewModel.cs
+0
-2
UC_SelectData.xaml
...eatingHelper.UI/UIModule/UC_SelectData/UC_SelectData.xaml
+26
-4
ViewModel_UC_SelectData.cs
...lper.UI/UIModule/UC_SelectData/ViewModel_UC_SelectData.cs
+46
-1
ThickHeatData.cs
...Y.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData.cs
+1
-1
ThickHeatData4SQLite_V2.cs
...tAnalyst.Fix/FLY.HeatingHelper/ThickHeatData4SQLite_V2.cs
+11
-9
No files found.
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/FLY.HeatingHelper.UI.csproj
View file @
a269f6c1
...
...
@@ -210,6 +210,10 @@
<Project>
{119c3adc-f8e1-4f72-b89b-006236ff8586}
</Project>
<Name>
FLY.ControlLibrary
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\thick_public\Project.FLY.Misc\MISC\Misc.csproj"
>
<Project>
{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}
</Project>
<Name>
Misc
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\thick_public\Project.FLY.UI.Module\FLY.UI.Module\FLY.UI.Module.csproj"
>
<Project>
{4df79671-e814-49bd-864d-8257d6c6e072}
</Project>
<Name>
FLY.UI.Module
</Name>
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml
View file @
a269f6c1
...
...
@@ -164,6 +164,7 @@
<RadioButton Content="锁定1幅" Grid.Column="0" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=1}" Margin="5,0,0,0" FontSize="20"/>
<RadioButton Content="锁定2幅" Grid.Column="1" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=2}" Margin="5,0,0,0" FontSize="20"/>
<RadioButton Content="无锁定" Grid.Column="2" IsChecked="{Binding LockFrames,Converter={StaticResource lfc},ConverterParameter=0}" Margin="5,0,0,0" FontSize="20"/>
<CheckBox IsChecked="{Binding LockAngle}" Content="锁定旋转角" Grid.Row="1" Grid.ColumnSpan="2"/>
</Grid>
<Grid DockPanel.Dock="Top">
<Grid>
...
...
@@ -204,6 +205,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Content="手动前" Click="AirRingShift_Add" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="0" FontFamily="YouYuan" Margin="5"/>
<Button Content="手动后" Click="AirRingShift_Sub" Style="{DynamicResource AccentedSquareButtonStyle}" Grid.Column="1" FontFamily="YouYuan" Margin="5"/>
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml.cs
View file @
a269f6c1
...
...
@@ -101,6 +101,8 @@ namespace FLY.HeatingHelper.UI.UIModule
public
int
LockFrames
{
get
;
set
;
}
=
1
;
public
bool
LockAngle
{
get
;
set
;
}
=
true
;
public
int
SearchProgressValue
{
get
;
set
;
}
=
0
;
public
bool
SearchEnabled
{
get
;
set
;
}
=
true
;
...
...
@@ -185,8 +187,6 @@ namespace FLY.HeatingHelper.UI.UIModule
//tmpVM.PropertyChanged += DataSelecter_PropertyChanged;
vm1
.
OnLoaded
(
true
);
vm2
.
OnLoaded
();
vm1
.
UpdateChart
();
vm2
.
UpdateChart
();
UpdateData
(
1
);
UpdateData
(
2
);
UpdateVarChart
();
...
...
@@ -430,7 +430,7 @@ namespace FLY.HeatingHelper.UI.UIModule
while
(
rb
<
0
)
rb
+=
_data
.
BoltCnt
;
ResetBolt
=
rb
;
RotAngle
=
ra
+
result
.
deltaAngle
;
},
int
.
MaxValue
,
15
,
tru
e
,
true
);
},
int
.
MaxValue
,
15
,
!
LockAngl
e
,
true
);
}
public
double
[]
ExpandOrShrinkData
(
double
[]
ori
,
int
orideg
,
int
dstdeg
)
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_FramePicker.xaml
View file @
a269f6c1
...
...
@@ -27,8 +27,8 @@
</Setter>
</Style>-->
<Style TargetType="{x:Type c1c:C1Chart}">
<Setter Property="Foreground" Value="#FFF0F8FE" />
<Setter Property="Background" Value="#4C000F14" />
<
!--<
Setter Property="Foreground" Value="#FFF0F8FE" />
<Setter Property="Background" Value="#4C000F14" />
-->
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="0" />
...
...
@@ -44,24 +44,39 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<c1c:C1Chart x:Name="myChart" ChartType="Line">
<c1c:C1Chart.Data>
<c1c:ChartData>
<c1c:DataSeries Values="{Binding DS_thick}" AxisY="ay0" Label="厚度"/>
<c1c:DataSeries Values="{Binding DS_heat}" AxisY="ay1" Label="加热率"/>
</c1c:ChartData>
</c1c:C1Chart.Data>
<c1c:C1Chart.View>
<c1c:ChartView>
<c1c:ChartView.AxisY>
<c1c:Axis Visible="False"/>
</c1c:ChartView.AxisY>
<c1c:Axis x:Name="ay0" AxisType="Y" Title="厚度" Position="Near"/>
<c1c:Axis x:Name="ay1" AxisType="Y" Title="加热率" Position="Far"/>
</c1c:ChartView>
</c1c:C1Chart.View>
<c1c:Legend Position="Right" />
</c1c:C1Chart>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<c1c:C1Chart x:Name="myChart" ChartType="Line" Margin="5,0,0,0">
<c1c:C1Chart.Data>
<c1c:ChartData>
<c1c:DataSeries Values="{Binding DS_thick}" AxisY="ay0" Label="厚度" ChartType="Column"
PlotElementLoaded="DataSeries_PlotElementLoaded"/>
<c1c:DataSeries Values="{Binding DS_heat}" AxisY="ay1" Label="加热率"/>
</c1c:ChartData>
</c1c:C1Chart.Data>
<c1c:C1Chart.View>
<c1c:ChartView>
<c1c:ChartView.AxisY>
<c1c:Axis Visible="False"/>
</c1c:ChartView.AxisY>
<c1c:Axis Name="ay0" AxisType="Y" Title="厚度" Position="Near"
Min="{Binding AsisY_Min}"
Max="{Binding AsisY_Max}"
MajorGridStroke="Blue"
ItemsSource="{Binding AsisY_Ticks}"/>
<c1c:Axis Name="ay1" AxisType="Y" Title="加热率" Position="Far"
Min="0" Max="100"/>
</c1c:ChartView>
</c1c:C1Chart.View>
</c1c:C1Chart>
<Slider Grid.Row="1" Margin="20,3,20,3"
Minimum="{Binding MinFrame}"
Maximum="{Binding MaxFrame}"
Value="{Binding SelectedFrame}"/>
</Grid>
</Border>
<DockPanel Grid.Row="1">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_FramePicker.xaml.cs
View file @
a269f6c1
...
...
@@ -25,67 +25,15 @@ namespace FLY.HeatingHelper.UI.UIModule
/// </summary>
public
partial
class
UC_FramePicker
:
UserControl
{
#
region
SelectedFrame
属性
public
static
readonly
DependencyProperty
SelectedFrameProperty
=
DependencyProperty
.
Register
(
"SelectedFrame"
,
typeof
(
Int32
),
typeof
(
UC_FramePicker
),
new
FrameworkPropertyMetadata
(
new
PropertyChangedCallback
(
OnSelectedFrameChanged
)));
public
Int32
SelectedFrame
{
get
{
return
(
Int32
)
GetValue
(
SelectedFrameProperty
);
}
set
{
SetValue
(
SelectedFrameProperty
,
value
);
}
}
private
static
void
OnSelectedFrameChanged
(
DependencyObject
obj
,
DependencyPropertyChangedEventArgs
args
)
{
UC_FramePicker
control
=
(
UC_FramePicker
)
obj
;
//RoutedPropertyChangedEventArgs<decimal> e = new RoutedPropertyChangedEventArgs<decimal>(
// (decimal)args.OldValue, (decimal)args.NewValue, ValueChangedEvent);
RoutedPropertyChangedEventArgs
<
decimal
>
e
=
new
RoutedPropertyChangedEventArgs
<
decimal
>(
(
decimal
)
args
.
OldValue
,
(
decimal
)
args
.
NewValue
);
control
.
OnValueChanged
(
e
);
}
protected
virtual
void
OnValueChanged
(
RoutedPropertyChangedEventArgs
<
decimal
>
args
)
{
RaiseEvent
(
args
);
}
#
endregion
#
region
MinFrame
属性
public
static
readonly
DependencyProperty
MinFrameProperty
=
DependencyProperty
.
Register
(
"MinFrame"
,
typeof
(
Int32
),
typeof
(
UC_FramePicker
),
new
FrameworkPropertyMetadata
());
public
Int32
MinFrame
{
get
{
return
(
Int32
)
GetValue
(
MinFrameProperty
);
}
set
{
SetValue
(
MinFrameProperty
,
value
);
}
}
#
endregion
#
region
MaxFrame
属性
public
static
readonly
DependencyProperty
MaxFrameProperty
=
DependencyProperty
.
Register
(
"MaxFrame"
,
typeof
(
Int32
),
typeof
(
UC_FramePicker
),
new
FrameworkPropertyMetadata
());
public
Int32
MaxFrame
{
get
{
return
(
Int32
)
GetValue
(
MaxFrameProperty
);
}
set
{
SetValue
(
MaxFrameProperty
,
value
);
}
}
#
endregion
public
UC_FramePicker
()
{
InitializeComponent
();
//myChart.Data.Children
}
private
void
DataSeries_PlotElementLoaded
(
object
sender
,
EventArgs
e
)
{
(
DataContext
as
UC_FramePickerViewModel
).
PELoaded
(
sender
,
e
);
}
}
public
class
UC_FramePickerViewModel
:
INotifyPropertyChanged
...
...
@@ -125,11 +73,11 @@ namespace FLY.HeatingHelper.UI.UIModule
{
if
(
_minFrame
!=
value
)
{
_minFrame
=
value
;
if
(
SelectedFrame
<
_minFrame
)
if
(
SelectedFrame
<
value
)
{
SelectedFrame
=
_minFram
e
;
SelectedFrame
=
valu
e
;
}
_minFrame
=
value
;
}
}
}
...
...
@@ -145,11 +93,11 @@ namespace FLY.HeatingHelper.UI.UIModule
{
if
(
_maxFrame
!=
value
)
{
_maxFrame
=
value
;
if
(
SelectedFrame
>
_maxFrame
)
if
(
SelectedFrame
>
value
)
{
SelectedFrame
=
_maxFram
e
;
SelectedFrame
=
valu
e
;
}
_maxFrame
=
value
;
}
}
}
...
...
@@ -196,7 +144,8 @@ namespace FLY.HeatingHelper.UI.UIModule
get
{
if
(
_data
==
null
)
return
DateTime
.
MinValue
;
if
(
SelectedFrame
<
MinFrame
&&
SelectedFrame
>
MaxFrame
)
return
DateTime
.
MinValue
;
if
(
SelectedFrame
<
MinFrame
||
SelectedFrame
>
MaxFrame
)
return
DateTime
.
MinValue
;
if
(
SelectedFrame
<
0
||
SelectedFrame
>=
_data
.
Dat_Times
.
Count
())
return
DateTime
.
MinValue
;
return
_data
.
Dat_Times
[
SelectedFrame
];
}
}
...
...
@@ -256,38 +205,30 @@ namespace FLY.HeatingHelper.UI.UIModule
public
DoubleCollection
DS_heat
{
get
;
set
;
}
public
void
UpdateChart
()
public
double
Thick_Mean
{
get
;
set
;
}
public
double
AsisY_Min
{
get
;
set
;
}
public
double
AsisY_Max
{
get
;
set
;
}
public
List
<
KeyValuePair
<
object
,
double
>>
AsisY_Ticks
{
get
;
set
;
}
public
void
PELoaded
(
object
s
,
EventArgs
e
)
{
double
[]
tmp
=
_data
.
GetThicksByIndex
(
SelectedFrame
,
ResetBolt
,
RotAngle
);
double
[]
tmph
=
_data
.
GetHeatsByIndex
(
SelectedFrame
,
-
1
,
-
1
);
if
(
tmp
==
null
||
tmph
==
null
)
return
;
DS_thick
=
new
DoubleCollection
(
tmp
);
DS_heat
=
new
DoubleCollection
(
tmph
);
//if (MySeries.Count == 0)
//{
// var L1 = new LineSeries
// {
// Title = "厚度",
// Values = v1,
// DataLabels = false,
// Fill = new SolidColorBrush(Colors.Transparent),
// PointGeometrySize = 3,
// ScalesYAt = 0,
// };
// var L2 = new LineSeries
// {
// Title = "加热率",
// Values = v2,
// DataLabels = false,
// Fill = new SolidColorBrush(Colors.Transparent),
// PointGeometrySize = 3,
// ScalesYAt = 1,
// };
// MySeries.Add(L1);
// MySeries.Add(L2);
//}
//v1.Clear(); v1.AddRange(_data.GetThicksByID(SelectedFrame, ResetBolt, RotAngle));
//v2.Clear(); v2.AddRange(_data.GetHeatsByID(SelectedFrame, -1, -1));
PlotElement
pe
=
s
as
PlotElement
;
double
v
=
Math
.
Abs
(
pe
.
DataPoint
.
Value
);
if
(
v
<=
AsisY_Max
/
3
)
{
pe
.
Fill
=
new
SolidColorBrush
(
Colors
.
Green
);
}
else
if
(
v
<=
AsisY_Max
*
2
/
3
)
{
pe
.
Fill
=
new
SolidColorBrush
(
Colors
.
Yellow
);
}
else
{
pe
.
Fill
=
new
SolidColorBrush
(
Colors
.
Red
);
}
}
private
void
UpdateData
()
...
...
@@ -295,7 +236,29 @@ namespace FLY.HeatingHelper.UI.UIModule
if
(
SelectedFrame
<
0
)
return
;
ResetBolt
=
_data
.
GetResetBoltByIndex
(
SelectedFrame
);
RotAngle
=
_data
.
GetRotAngleByIndex
(
SelectedFrame
);
UpdateChart
();
Thick_Mean
=
_data
.
Dat_Means
[
SelectedFrame
];
double
[]
tmp
=
_data
.
GetThicksByIndex
(
SelectedFrame
,
ResetBolt
,
RotAngle
);
double
[]
tmph
=
_data
.
GetHeatsByIndex
(
SelectedFrame
,
-
1
,
-
1
);
if
(
tmp
==
null
||
tmph
==
null
)
return
;
for
(
int
i
=
0
;
i
<
tmp
.
Count
();
i
++)
{
if
(
double
.
IsNaN
(
tmp
[
i
]))
continue
;
tmp
[
i
]
-=
Thick_Mean
;
}
AsisY_Min
=
-
Thick_Mean
*
0.09
;
AsisY_Max
=
Thick_Mean
*
0.09
;
AsisY_Ticks
=
new
List
<
KeyValuePair
<
object
,
double
>>
{
new
KeyValuePair
<
object
,
double
>(
Thick_Mean
.
ToString
(
"F1"
),
0
),
new
KeyValuePair
<
object
,
double
>(
"3%"
,
Thick_Mean
*
0.03
),
new
KeyValuePair
<
object
,
double
>(
"-3%"
,
-
Thick_Mean
*
0.03
),
new
KeyValuePair
<
object
,
double
>(
"6%"
,
Thick_Mean
*
0.06
),
new
KeyValuePair
<
object
,
double
>(
"-6%"
,
-
Thick_Mean
*
0.06
),
new
KeyValuePair
<
object
,
double
>(
"9%"
,
Thick_Mean
*
0.09
),
new
KeyValuePair
<
object
,
double
>(
"-9%"
,
-
Thick_Mean
*
0.09
)
};
DS_thick
=
new
DoubleCollection
(
tmp
);
DS_heat
=
new
DoubleCollection
(
tmph
);
}
public
void
InitCmd
()
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_HeatBoltAnalystViewModel.cs
View file @
a269f6c1
...
...
@@ -85,8 +85,6 @@ namespace FLY.HeatingHelper.UI.UIModule
vm1
.
InitData
(
mdata
);
vm2
.
InitData
(
mdata
);
vmDiff
.
Init
(
mdata
);
vm1
.
UpdateChart
();
vm2
.
UpdateChart
();
}
public
void
UnLoaded
(
object
s
)
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_SelectData/UC_SelectData.xaml
View file @
a269f6c1
...
...
@@ -97,8 +97,26 @@
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="15,0,15,0">
<Label Content="分析数据范围:" FontFamily="YouYuan"/>
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="0,0,5,0">
<StackPanel Orientation="Horizontal">
<Label Content="分析数据范围:"/>
<TextBlock Margin="10,5">
<TextBlock.Text>
<MultiBinding StringFormat="{}({0:MM/dd HH:mm:ss})-({1:MM/dd HH:mm:ss})">
<Binding Path="AnalystDataFrom" />
<Binding Path="AnalystDataTo" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Margin="10,5">
<TextBlock.Text>
<MultiBinding StringFormat="{}({0})-({1})">
<Binding Path="Dat.AnalystIndexFrom" />
<Binding Path="Dat.AnalystIndexTo" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</StackPanel>
<Controls:RangeSlider Minimum="0"
Maximum="{Binding RecordCount, Mode=OneWay}"
LowerValue="{Binding Dat.AnalystIndexFrom}"
...
...
@@ -130,6 +148,7 @@
UpperExtent="11"
ConnectionFill="AliceBlue"/>
<c1c:DataSeries ValuesSource="{Binding DS_thick}" AxisY="ay0" Label="厚度"/>
<c1c:DataSeries ValuesSource="{Binding DS_2sigma}" AxisY="ay1" Label="2Sigma"/>
</c1c:ChartData>
</c1c:C1Chart.Data>
<c1c:C1Chart.View>
...
...
@@ -138,9 +157,12 @@
<c1c:Axis Visible="False" Min="0" Max="10"/>
</c1c:ChartView.AxisY>
<c1c:ChartView.AxisX>
<c1c:Axis Max="{Binding RecordCount, Mode=OneWay}"/>
<c1c:Axis Max="{Binding RecordCount, Mode=OneWay}"
/>
</c1c:ChartView.AxisX>
<c1c:Axis Name="ay0" AxisType="Y" Title="厚度" Position="Near"/>
<c1c:Axis Name="ay0" AxisType="Y" Title="厚度" Position="Near"
/>
<c1c:Axis Name="ay1" AxisType="Y" Title="2Sigma" Position="Far"
Min="-2" Max="20"/>
</c1c:ChartView>
</c1c:C1Chart.View>
</c1c:C1Chart>
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_SelectData/ViewModel_UC_SelectData.cs
View file @
a269f6c1
...
...
@@ -3,6 +3,7 @@ using System;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Linq
;
using
System.ServiceModel.Channels
;
using
System.Text
;
using
System.Threading.Tasks
;
...
...
@@ -20,6 +21,14 @@ namespace FLY.HeatingHelper.UI.UIModule.UC_SelectData
DefaultAnalystData
=
new
RelayCommand
(
Command_DefaultAnalystData
);
Test
=
new
RelayCommand
(
Command_Test
);
Command_DefaultLoadDataRange
();
Misc
.
BindingOperations
.
SetBinding
(
Dat
,
"AnalystIndexFrom"
,
()
=>
{
AnalystDataFrom
=
null
;
});
Misc
.
BindingOperations
.
SetBinding
(
Dat
,
"AnalystIndexTo"
,
()
=>
{
AnalystDataTo
=
null
;
});
}
#
region
UI
界面
...
...
@@ -41,6 +50,40 @@ namespace FLY.HeatingHelper.UI.UIModule.UC_SelectData
}
public
double
[]
DS_thick
{
get
;
set
;
}
public
double
[]
DS_2sigma
{
get
;
set
;
}
public
DateTime
?
AnalystDataFrom
{
get
{
if
(
Dat
is
null
)
return
null
;
if
(
Dat
.
AnalystIndexFrom
>=
0
)
{
return
Dat
.
Dat_Times
[
Dat
.
AnalystIndexFrom
];
}
return
null
;
}
set
{
}
}
public
DateTime
?
AnalystDataTo
{
get
{
if
(
Dat
is
null
)
return
null
;
if
(
Dat
.
AnalystIndexTo
>=
0
)
{
return
Dat
.
Dat_Times
[
Dat
.
AnalystIndexTo
];
}
return
null
;
}
set
{
}
}
#
endregion
#
region
内部功能函数
...
...
@@ -48,6 +91,7 @@ namespace FLY.HeatingHelper.UI.UIModule.UC_SelectData
{
if
(
RecordCount
<=
0
)
return
;
DS_thick
=
Dat
.
Dat_Means
.
ToArray
();
DS_2sigma
=
Dat
.
Dat_Sigmas
.
ToArray
();
}
#
endregion
...
...
@@ -68,7 +112,8 @@ namespace FLY.HeatingHelper.UI.UIModule.UC_SelectData
Dat
.
ResetCluster
();
Dat
.
ClusterOnThickMean
();
RecordCount
=
1
;
UpdateChart
();
OnLoaded
();
//UpdateChart();
}
public
RelayCommand
PreData
{
get
;
internal
set
;
}
=
null
;
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData.cs
View file @
a269f6c1
...
...
@@ -1357,7 +1357,7 @@ namespace FLY.HeatingHelper
int
shift
=
r
.
Item1
;
if
(
maxcorel
<
r
.
Item2
)
{
maxcorel
=
max
;
maxcorel
=
r
.
Item2
;
theshift
=
shift
;
}
}
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData4SQLite_V2.cs
View file @
a269f6c1
...
...
@@ -52,7 +52,7 @@ namespace FLY.HeatingHelper
//string connectionString = ConfigurationManager.ConnectionStrings[DBName].ConnectionString.ToString();
//using (db = new Model.Model_HeatData(DBName))
//{
// var result = db.Database.SqlQuery<Temp>("SELECT min(\"
EndTime\")as A,MAX(\"End
Time\") as B from ThickHeat").First();
// var result = db.Database.SqlQuery<Temp>("SELECT min(\"
Time\")as A,MAX(\"
Time\") as B from ThickHeat").First();
// TotalDataFrom = DateTime.Parse(result.A);
// TotalDataTo = DateTime.Parse(result.B);
// DataTo = new DateTime(TotalDataTo.Ticks);
...
...
@@ -60,7 +60,7 @@ namespace FLY.HeatingHelper
// //DataFrom = DBTo - new TimeSpan(2, 0, 0, 0);
//}
mSQLiteHelper
.
ConnectionString
=
ConnectionString
;
var
dtb
=
mSQLiteHelper
.
ExecuteReader
(
"SELECT min(\"
EndTime\")as A,MAX(\"End
Time\") as B from ThickHeat"
);
var
dtb
=
mSQLiteHelper
.
ExecuteReader
(
"SELECT min(\"
Time\")as A,MAX(\"
Time\") as B from ThickHeat"
);
if
(
dtb
.
Rows
[
0
].
IsNull
(
"A"
))
return
;
TotalDataFrom
=
DateTime
.
Parse
(
dtb
.
Rows
[
0
].
Field
<
string
>(
"A"
));
TotalDataTo
=
DateTime
.
Parse
(
dtb
.
Rows
[
0
].
Field
<
string
>(
"B"
));
...
...
@@ -69,7 +69,7 @@ namespace FLY.HeatingHelper
string
cmdstr
;
if
(
reload
||
_ids
.
Count
()
==
0
)
{
cmdstr
=
string
.
Format
(
"select * from [ThickHeat] where IsStable=1 and
EndTime>=\"{0}\" and End
Time<=\"{1}\""
,
cmdstr
=
string
.
Format
(
"select * from [ThickHeat] where IsStable=1 and
Time>=\"{0}\" and
Time<=\"{1}\""
,
(
LoadDataTo
-
LoadDataSpan
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
LoadDataTo
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
...
...
@@ -102,6 +102,8 @@ namespace FLY.HeatingHelper
_thick_2sigmas
.
Clear
();
_heats
.
Clear
();
_ids
.
Clear
();
_resetBolts
.
Clear
();
_rotAngles
.
Clear
();
int
cnt
=
0
;
foreach
(
DataRow
dr
in
dataTable
.
Rows
)
{
...
...
@@ -114,13 +116,13 @@ namespace FLY.HeatingHelper
if
(
IsHeatSame
(
h1
,
_heats
.
Last
()))
DeleteDataLast
();
}
_ids
.
Add
((
int
)
dr
.
Field
<
long
>(
"ID"
));
_dat_times
.
Add
(
dr
.
Field
<
DateTime
>(
"
End
Time"
));
_dat_times
.
Add
(
dr
.
Field
<
DateTime
>(
"Time"
));
_thicks
.
Add
(
t1
);
_heats
.
Add
(
h1
);
var
t2
=
RemoveNaN
(
t1
);
var
r
=
MathNet
.
Numerics
.
Statistics
.
Statistics
.
MeanStandardDeviation
(
t2
);
_thick_means
.
Add
(
r
.
Item1
);
_thick_2sigmas
.
Add
(
r
.
Item2
);
_thick_2sigmas
.
Add
(
r
.
Item2
*
2
);
_resetBolts
.
Add
((
int
)
dr
.
Field
<
long
>(
"OrgBoltNo"
));
_rotAngles
.
Add
(
dr
.
Field
<
double
>(
"RAngle"
));
cnt
++;
...
...
@@ -152,11 +154,11 @@ namespace FLY.HeatingHelper
_ids
.
Add
(
id
);
_thicks
.
Add
(
t1
);
_heats
.
Add
(
h1
);
_dat_times
.
Add
(
dr
.
Field
<
DateTime
>(
"
End
Time"
));
_dat_times
.
Add
(
dr
.
Field
<
DateTime
>(
"Time"
));
var
t2
=
RemoveNaN
(
t1
);
var
r
=
MathNet
.
Numerics
.
Statistics
.
Statistics
.
MeanStandardDeviation
(
t2
);
_thick_means
.
Add
(
r
.
Item1
);
_thick_2sigmas
.
Add
(
r
.
Item2
);
_thick_2sigmas
.
Add
(
r
.
Item2
*
2
);
_resetBolts
.
Add
((
int
)
dr
.
Field
<
long
>(
"OrgBoltNo"
));
_rotAngles
.
Add
(
dr
.
Field
<
double
>(
"RAngle"
));
cnt
++;
...
...
@@ -197,7 +199,7 @@ namespace FLY.HeatingHelper
public
override
int
LoadMetaDataFromDB
()
{
mSQLiteHelper
.
ConnectionString
=
ConnectionString
;
var
dtb
=
mSQLiteHelper
.
ExecuteReader
(
"SELECT min(\"
EndTime\")as A,MAX(\"End
Time\") as B from ThickHeat"
);
var
dtb
=
mSQLiteHelper
.
ExecuteReader
(
"SELECT min(\"
Time\")as A,MAX(\"
Time\") as B from ThickHeat"
);
if
(
dtb
.
Rows
[
0
].
IsNull
(
"A"
))
return
-
1
;
TotalDataFrom
=
DateTime
.
Parse
(
dtb
.
Rows
[
0
].
Field
<
string
>(
"A"
));
TotalDataTo
=
DateTime
.
Parse
(
dtb
.
Rows
[
0
].
Field
<
string
>(
"B"
));
...
...
@@ -213,7 +215,7 @@ namespace FLY.HeatingHelper
if
((
reload
==
0
&&
_ids
.
Count
()
==
0
)
||
(
reload
==
1
))
{
clear
=
true
;
cmdstr
=
string
.
Format
(
"select * from [ThickHeat] where IsStable=1 and
EndTime>=\"{0}\" and End
Time<=\"{1}\""
,
cmdstr
=
string
.
Format
(
"select * from [ThickHeat] where IsStable=1 and
Time>=\"{0}\" and
Time<=\"{1}\""
,
LoadDataFrom
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
LoadDataTo
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
...
...
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