Commit 34d5f53a authored by 潘栩锋's avatar 潘栩锋 :bicyclist:

合并

parents bd01a6d7 1edad180
......@@ -47,7 +47,8 @@ namespace FLY.FeedbackRenZiJia.UI.Client
/// </summary>
public double Kp { get; set; } = 3;
public bool IsMoveByTakeEffect { get; set; } = true;
public bool IsMoveByDiffCTime { get; set; } = true;
/// <summary>
/// 复位区号
......@@ -233,6 +234,8 @@ namespace FLY.FeedbackRenZiJia.UI.Client
ucThickHeatVms[i] = new UcThickHeatVm();
ucThickHeatVms[i].Init($"记录{i+1}", bulkDbService, 0-i, Kp);
Misc.BindingOperations.SetBinding(this, nameof(Kp), ucThickHeatVms[i], nameof(UcThickHeatVm.Kp));
Misc.BindingOperations.SetBinding(this, nameof(IsMoveByTakeEffect), ucThickHeatVms[i], nameof(UcThickHeatVm.IsMoveByTakeEffect));
Misc.BindingOperations.SetBinding(this, nameof(IsMoveByDiffCTime), ucThickHeatVms[i], nameof(UcThickHeatVm.IsMoveByDiffCTime));
ucThickHeatVms[i].FrameUpdated += PgHeatAnalyseVm_FrameUpdated;
}
......@@ -276,18 +279,19 @@ namespace FLY.FeedbackRenZiJia.UI.Client
return false;
if (feedback.NBolts != ucThickHeatVms[0].frame.Thicks.Count())
return false;
if (ucThickHeatVms[0].frame.FilmLength != ucThickHeatVms[1].frame.FilmLength)
return false;//膜距离不同不能比较
if (BType != BlowingType.Fix) {
if (ucThickHeatVms[0].frame.RAngle != ucThickHeatVms[1].frame.RAngle)
return false;//扫描架,追边360, 旋转角度不能改变
}
//if (Math.Abs(ucThickHeatVms[0].frame.FilmLength - ucThickHeatVms[1].frame.FilmLength) > 1)
//{
// //偏差大于1m
// return false;//膜距离不同不能比较
//}
//if (Math.Abs(ucThickHeatVms[0].frame.RAngle - ucThickHeatVms[1].frame.RAngle) > 20)
//{
// //偏差大于20°
// return false;//膜距离不同不能比较
//}
return true;
}
class CallDiffResult
......
......@@ -21,7 +21,7 @@
</ResourceDictionary>
</UserControl.Resources>
<Grid d:DataContext="{StaticResource viewModel}">
<Border Style="{StaticResource Card.Border}" >
<Border Style="{StaticResource Styles.Card.Border}" >
<StackPanel>
<Grid>
<Grid.RowDefinitions>
......@@ -103,7 +103,7 @@
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Style="{StaticResource Text.FieldHeaderEditable2}" Text="ID:" />
<TextBox Style="{StaticResource Text.FieldContentInput2}" Text="{Binding Number}"/>
<TextBox Style="{StaticResource Text.FieldContentInput2}" Text="{Binding Number}" MinWidth="100"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsVaild,Converter={StaticResource visbilityconv}}">
<StackPanel Orientation="Horizontal" Margin="{StaticResource Badges.Margin}" VerticalAlignment="Bottom" >
......@@ -169,7 +169,7 @@
</StackPanel>
</StackPanel>
<TextBlock Style="{StaticResource Card.Title}" Text="{Binding Title}"/>
<TextBlock Style="{StaticResource Styles.Card.Title}" Text="{Binding Title}"/>
</StackPanel>
<Grid
Margin="10,0"
......
......@@ -18,6 +18,7 @@ using FLY.FeedbackRenZiJia.IService;
using System.ComponentModel;
using Unity;
using GalaSoft.MvvmLight.Command;
using System.Collections.ObjectModel;
namespace FLY.FeedbackRenZiJia.UI.Client
{
......@@ -62,13 +63,22 @@ namespace FLY.FeedbackRenZiJia.UI.Client
public bool HasCheck { get; set; }
public int Delay { get; set; }
public int ThresholdSigmaMax { get; set; }
public int SearchAngleRange { get; set; }
public int SearchRange { get; set; }
public int StableRange { get; set; }
public int[] HeatEffectCurve { get; set; }
public bool IsForbidUpDown { get; set; }
public int CtrlLine { get; set; }
public double CtrlLine { get; set; }
public double Kp { get; set; }
/// <summary>
/// 自动计算时,Kp最大值
/// </summary>
public double MaxKp { get; set; } = 5;
/// <summary>
/// 自动计算时,Kp最大值
/// </summary>
public double MinKp { get; set; } = 1;
/// <summary>
/// 自动对位
......@@ -89,6 +99,18 @@ namespace FLY.FeedbackRenZiJia.UI.Client
/// 最大功率
/// </summary>
public int MaxHeat { get; set; }
public double OffsetGraphYRangePercent { get; set; }
/// <summary>
/// 分级控制
/// </summary>
public ObservableCollection<LvCtrlLine> LvCtrlLines { get; } = new ObservableCollection<LvCtrlLine>();
/// <summary>
/// 对厚度数据横向平滑 单位加热棒数。 特别的当Smooth = ChannelCnt/2 就是膜泡的偏心度
/// </summary>
public int ThickSmoothRange { get; set; }
#endregion
#region Command
......@@ -96,7 +118,6 @@ namespace FLY.FeedbackRenZiJia.UI.Client
public RelayCommand ApplyCmd { get; }
public RelayCommand BestImageCmd { get; }
public RelayCommand AutoONoImageCmd { get; }
#endregion
public IFeedbackHeatService Feedback{ get; private set; }
......@@ -113,7 +134,6 @@ namespace FLY.FeedbackRenZiJia.UI.Client
ApplyCmd = new RelayCommand(Apply);
BestImageCmd = new RelayCommand(BestImage);
AutoONoImageCmd = new RelayCommand(AutoONoImage);
}
[InjectionMethod]
public void Init(
......@@ -133,14 +153,31 @@ namespace FLY.FeedbackRenZiJia.UI.Client
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.IsForbidUpDown), this, nameof(IsForbidUpDown));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.CtrlLine), this, nameof(CtrlLine));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.Kp), this, nameof(Kp));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.MaxKp), this, nameof(MaxKp));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.MinKp), this, nameof(MinKp));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.MaxHeat), this, nameof(MaxHeat));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.IsAutoONo), this, nameof(IsAutoONo));
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.LvCtrlLines), () => {
LvCtrlLines.Clear();
if (this.HeatCell.LvCtrlLines == null)
return;
if (this.HeatCell.LvCtrlLines.Count() == 0)
return;
foreach (var lvCtrlLine in this.HeatCell.LvCtrlLines)
{
LvCtrlLines.Add(new LvCtrlLine() { CtrlLine = lvCtrlLine.CtrlLine, Mix = lvCtrlLine.Mix });
}
});
Misc.BindingOperations.SetBinding(this.HeatCell, nameof(IHeatCellService.ThickSmoothRange), this, nameof(ThickSmoothRange));
Misc.BindingOperations.SetBinding(this.Feedback, nameof(IFeedbackHeatService.Step), this, nameof(Step));
Misc.BindingOperations.SetBinding(this.Feedback, nameof(IFeedbackHeatService.HasCheck), this, nameof(HasCheck));
Misc.BindingOperations.SetBinding(this.Feedback, nameof(IFeedbackHeatService.Delay), this, nameof(Delay));
Misc.BindingOperations.SetBinding(this.Feedback, nameof(IFeedbackHeatService.HasCheckFilmVelocity), this, nameof(HasCheckFilmVelocity));
Misc.BindingOperations.SetBinding(this.Feedback, nameof(IFeedbackHeatService.OffsetGraphYRangePercent), this, nameof(OffsetGraphYRangePercent));
Misc.BindingOperations.SetBinding(this.HeatBuf, nameof(IHeatBufService.ThresholdSigmaMax), this, nameof(ThresholdSigmaMax));
Misc.BindingOperations.SetBinding(this.HeatBuf, nameof(IHeatBufService.StableRange), this, nameof(StableRange));
......@@ -154,7 +191,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client
Misc.BindingOperations.SetBinding(this.HeatBuf, nameof(IHeatBufService.ThresholdR), this, nameof(ThresholdR));
Misc.BindingOperations.SetBinding(this.HeatBuf, nameof(IHeatBufService.ThresholdMaxMin), this, nameof(ThresholdMaxMin));
Misc.BindingOperations.SetBinding(this.HeatBuf, nameof(IHeatBufService.SearchAngleRange), this, nameof(SearchAngleRange));
Misc.BindingOperations.SetBinding(this.HeatBuf, nameof(IHeatBufService.SearchRange), this, nameof(SearchRange));
#endregion
}
......@@ -215,15 +252,34 @@ namespace FLY.FeedbackRenZiJia.UI.Client
HeatCell.IsForbidUpDown = this.IsForbidUpDown;
HeatCell.CtrlLine = this.CtrlLine;
HeatCell.Kp = this.Kp;
HeatCell.MaxKp = this.MaxKp;
HeatCell.MinKp = this.MinKp;
HeatCell.MaxHeat = this.MaxHeat;
HeatCell.IsAutoONo = this.IsAutoONo;
if (LvCtrlLines.Count() > 0)
{
var lvCtrlLines = new LvCtrlLine[LvCtrlLines.Count()];
for (int i = 0; i < LvCtrlLines.Count(); i++)
{
var lvCtrlLine = LvCtrlLines[i];
lvCtrlLines[i] = new LvCtrlLine() { CtrlLine = lvCtrlLine.CtrlLine, Mix = lvCtrlLine.Mix };
}
HeatCell.LvCtrlLines = lvCtrlLines;
}
else
{
HeatCell.LvCtrlLines = null;
}
HeatCell.ThickSmoothRange = ThickSmoothRange;
Feedback.Step=this.Step;
Feedback.HasCheckFilmVelocity=this.HasCheckFilmVelocity;
Feedback.HasCheck=this.HasCheck;
Feedback.Delay=this.Delay;
Feedback.OffsetGraphYRangePercent = this.OffsetGraphYRangePercent;
......@@ -232,7 +288,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client
HeatBuf.HeatEffectCurve=this.HeatEffectCurve;
HeatBuf.ThresholdR = this.ThresholdR;
HeatBuf.ThresholdMaxMin = this.ThresholdMaxMin;
HeatBuf.SearchAngleRange = this.SearchAngleRange;
HeatBuf.SearchRange = this.SearchRange;
HeatCell.Apply();
HeatBuf.Apply();
......@@ -240,15 +296,6 @@ namespace FLY.FeedbackRenZiJia.UI.Client
FLY.ControlLibrary.Window_Tip.Show("参数设置", "成功", TimeSpan.FromSeconds(2));
}
private void AutoONoImage()
{
var p = container.Resolve<PgHeatAnalyse>();
//if (HeatCell.AutoONoStatus == AutoONoStatusEnum.Success)
{
p.SetNumber(HeatCell.AutoONoId0, HeatCell.AutoONoId1);
}
MultiLayout.FlyLayoutManager.NavigationService.Navigate(p);
}
private void BestImage()
{
......@@ -354,8 +401,6 @@ namespace FLY.FeedbackRenZiJia.UI.Client
return "等待:相关性不够";
case STABILITY.OK_CORREL:
return "稳定:相关性高";
case STABILITY.OK_HEAT_AND_THICK_CORREL:
return "稳定:加热相关性高";
default:
return "???";
}
......
......@@ -12,7 +12,7 @@ using System.Windows;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("佛山枫莱尔自动化技术有限公司")]
[assembly: AssemblyProduct("自动风环")]
[assembly: AssemblyCopyright("Copyright © 2020 FLYAutoamtion")]
[assembly: AssemblyCopyright("Copyright © 2022 FLYAutoamtion")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.0.0")]
[assembly: AssemblyFileVersion("6.0.0.0")]
[assembly: AssemblyVersion("7.4.0.0")]
[assembly: AssemblyFileVersion("7.4.0.0")]
[assembly: Guid("18607932-ECBC-4292-A3DE-5864B7FB14DB")]
......@@ -7,75 +7,26 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/GraphStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.FeedbackRenZiJia.UI.Client;component/Themes/Colors.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="Button.AccentedSquare2" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square.Accent}">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style x:Key="Button.Square2" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square}">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style x:Key="Button.HighlightedSquare2" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square.Highlight}">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="5"/>
</Style>
<DropShadowEffect x:Key="Card.Shadow" Color="#303030" Opacity=".25" BlurRadius="5" ShadowDepth="3"/>
<Style x:Key="Card.Title" TargetType="TextBlock">
<Setter Property="Background" Value="#FFC107"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Padding" Value="20 5"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="VerticalAlignment" Value="Top"/>
</Style>
<Style x:Key="Card.Border" TargetType="Border">
<Setter Property="Margin" Value="5"/>
<Setter Property="Background" Value="White"/>
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#EBEBEB"/>
<Setter Property="Effect" Value="{StaticResource Card.Shadow}"/>
</Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldHeader}" x:Key="Text.FieldHeader2">
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}" x:Key="Text.FieldHeader2">
<Setter Property="FontSize" Value="15" />
</Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldHeaderEditable}" x:Key="Text.FieldHeaderEditable2">
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader.Editable}" x:Key="Text.FieldHeaderEditable2">
<Setter Property="FontSize" Value="15" />
</Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldHeaderEditable}" x:Key="Text.FieldHeaderEditable"/>
<Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle_FieldContent}" x:Key="Text.FieldContentInput">
<Setter Property="Background" Value="WhiteSmoke"/>
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle_FieldContent}" x:Key="Text.FieldContentInput2">
<Style TargetType="TextBox" BasedOn="{StaticResource Styles.Text.FieldContent.Input.Card}" x:Key="Text.FieldContentInput2">
<Setter Property="FontSize" Value="20" />
<Setter Property="Background" Value="WhiteSmoke"/>
<Setter Property="MinWidth" Value="100"/>
</Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}" x:Key="Text.FieldContent2">
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldContent}" x:Key="Text.FieldContent2">
<Setter Property="FontSize" Value="15" />
</Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent}" x:Key="Text.FieldContent"/>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent_mm}" x:Key="Text.FieldContentMm"/>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent_mm_interval}" x:Key="Text.FieldContentMmInterval"/>
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle_FieldContent_mm}" x:Key="Text.FieldContentMm2">
<Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldContent.Unit}" x:Key="Text.FieldContentMm2">
<Setter Property="FontSize" Value="15" />
</Style>
<Style x:Key="AxisSectionStyle" TargetType="lvc:AxisSection" >
......
......@@ -4,7 +4,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.FeedbackRenZiJia.UI.Client.UiModule"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Feng.Wpf"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:lvc1="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Feng.Wpf"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="980"
>
......@@ -42,11 +44,6 @@
<Setter Property="DataLabel" Value="False"/>
</Style>
<local:AirRingGraphVmUt x:Key="viewModel"/>
<Geometry x:Key="Geometry.Close">
M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z
</Geometry>
</ResourceDictionary>
</UserControl.Resources>
<Border Style="{StaticResource BorderStyle_module}" >
......@@ -90,8 +87,8 @@
<TextBlock Text="设置" />
</StackPanel>
</Button>
<StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding CheckEnable, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" >
<!--正在检测时,把手动按钮全部隐藏-->
<StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding FeedbackHeat.CheckEnable, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" >
<Button Command="{Binding BaseUpCmd}" >
<StackPanel>
<Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/up.png"/>
......@@ -209,6 +206,7 @@
<Style.Triggers>
<DataTrigger Binding="{Binding CheckEnable}" Value="False">
<Setter Property="Source" Value="/FLY.FeedbackRenZiJia.UI.Client;component/Images/nurse_gray.png"/>
<Setter Property="Opacity" Value="0.7"/>
</DataTrigger>
</Style.Triggers>
</Style>
......@@ -271,13 +269,6 @@
Fill="Transparent"
Values="{Binding ThickPercents}"
Configuration="{Binding MapperThickPercents}"/>
<!--<lvc:ScatterSeries
PointGeometry="{StaticResource Geometry.Close}"
StrokeThickness ="1"
Stroke="{StaticResource Brushes.Thick}"
Fill="{StaticResource WhiteBrush}"
Values="{Binding ThickPercents}"
Configuration="{Binding MapperThickPercentsWithIsStable}"/>-->
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
......@@ -297,13 +288,73 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
LabelFormatter="{Binding YFormatter}"
MinValue="-50" MaxValue="50" FontFamily="Courier New" >
MinValue="{Binding OffsetGraphYMin}" MaxValue="{Binding OffsetGraphYMax}" FontFamily="Courier New" >
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="10"/>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="{Binding OffsetGraphStep}"/>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="400*"/>
<ColumnDefinition Width="280*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="2" Grid.RowSpan="2" Panel.ZIndex="1"
Margin="10,0" VerticalAlignment="Top" HorizontalAlignment="Right">
<Viewbox MaxHeight="25">
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel.Resources>
<Style TargetType="Viewbox">
<Setter Property="Height" Value="25"/>
<Setter Property="Width" Value="120"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal">
<Viewbox >
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TitleStyle}"
Foreground="{StaticResource WhiteBrush}"
Background="{StaticResource TextBrush}"
Opacity="0.8"
Text="混合: "
/>
<TextBlock Style="{StaticResource ValueStyle}"
Foreground="{StaticResource WhiteBrush}"
Background="{StaticResource TextBrush}"
Text="{Binding CurrMix,Mode=OneWay}"
/>
</StackPanel>
</Viewbox>
<Viewbox>
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource TitleStyle}"
Foreground="{StaticResource WhiteBrush}"
Background="{StaticResource TextBrush}"
Text=" 2σ: "
/>
<TextBlock Style="{StaticResource ValueStyle}"
Foreground="{StaticResource WhiteBrush}"
Background="{StaticResource TextBrush}"
>
<Run Text="{Binding CurrSigma2,Mode=OneWay, StringFormat={}{0:F1}}"/>%
</TextBlock>
</StackPanel>
</Viewbox>
</StackPanel>
</StackPanel>
</Viewbox>
</Grid>
</Grid>
<lvc:CartesianChart Grid.Row="1" Hoverable="False" DisableAnimations="True" DataTooltip="{x:Null}" Margin="5,2,2,2"
MouseMove="UIElement_OnMouseMove" MouseDown="UIElement_MouseDown" MouseUp="UIElement_MouseUp">
<lvc:CartesianChart.Series>
......
......@@ -47,11 +47,13 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
IUnityContainer container,
IFeedbackHeatService feedback,
IHeatBufService heatBuf,
IHeatCellService heatCell)
IHeatCellService heatCell,
FLY.Thick.Blowing.IService.IBlowingFixProfileService profileService
)
{
this.container = container;
viewModel = new AirRingGraphVm();
viewModel.Init(feedback, heatBuf, heatCell, btnClearH);
viewModel.Init(feedback, heatBuf, heatCell, btnClearH, profileService);
this.DataContext = viewModel;
}
......
......@@ -9,106 +9,14 @@ using System.Windows.Media;
namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
{
public class AirRingGraphVmUt : INotifyPropertyChanged
public class AirRingGraphVmUt : AirRingGraphVm
{
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// 长按驱动器
/// </summary>
public LongPress LPress { get; } = new LongPress();
#region 图表控制
public Func<double, string> YFormatter { get; private set; }
public int XMax { get; private set; }
#endregion
/// <summary>
/// 经过Kp 转换后的 厚度%
/// </summary>
public ChartValues<double> ThickPercents { get; } = new ChartValues<double>();
public ChartValues<int> PreHeats { get; } = new ChartValues<int>();
public ChartValues<int> Heats { get; } = new ChartValues<int>();
public ChartValues<int> HeatOffsets { get; } = new ChartValues<int>();
public ChartValues<bool> Bads { get; } = new ChartValues<bool>();
public object MapperPreHeats { get; private set; }
public object MapperThickPercents { get; private set; }
public object Mapper { get; private set; }
public double Kp { get; private set; } = 3;
/// <summary>
/// 当前选择加热通道
/// </summary>
public int SelectBoltNo { get; set; } = 40;
/// <summary>
/// 当前选择加热通道数量
/// </summary>
public int SelectBoltNoWidth { get; set; } = 3;
Brush BadsBrush;
Brush PreHeatsBrush;
public AirRingGraphVmUt()
{
#region 与数据无关界面参数
var resourceDictionary = new ResourceDictionary() { Source = new Uri("pack://application:,,,/FLY.FeedbackRenZiJia.UI.Client;component/Themes/Colors.xaml") };
BadsBrush = resourceDictionary["Brushes.Bad"] as Brush;
PreHeatsBrush = resourceDictionary["Brushes.PreHeat"] as Brush;
YFormatter = (y) =>
{
string text = y + "%";
return $"{text,6}";
};
MapperPreHeats = Mappers.Xy<int>()
.X((value, index) =>
{
return index + 1;
})
.Y((value, index) =>
{
if (index < Bads.Count() && index >= 0)
{
if (Bads[index])
{
if (value == 0)
return 100;
}
}
return value;
})
.Fill((value, index) =>
{
if (index < Bads.Count() && index >= 0)
{
if (Bads[index])
{
return BadsBrush;
}
}
return PreHeatsBrush;
});
MapperThickPercents = Mappers.Xy<double>()
.X((value, index) =>
{
return index + 1;
})
.Y((value) =>
{
return value * Kp;
});
Mapper = Mappers.Xy<int>()
.X((value, index) =>
{
return index + 1;
});
#endregion
#region 数据
double target = 150;
......
......@@ -62,12 +62,14 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
{
public event PropertyChangedEventHandler PropertyChanged;
public int BestOrgBoltNo { get; set; }
public int OrgBoltNo { get; set; }
public bool IsONoDiff { get; set; }
public double BestKp { get; set; }
public double Kp { get; set; }
public bool IsKpDiff { get; set; }
......@@ -79,13 +81,13 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
public string Msg { get; set; }
public bool IsShowBestOrgBoltNo { get; private set; } = true;
public bool IsShowBestOrgBoltNo { get; set; } = true;
public bool IsShowBest => IsKpDiff || IsONoDiff;
public RelayCommand OpenRecordCmd { get; }
IBlowingService blowingService;
IHeatBufService heatBufService;
IUnityContainer container;
......@@ -115,13 +117,13 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
this.heatCellService = heatCellService;
this.blowingService = blowingService;
Misc.BindingOperations.SetBinding(blowingService, nameof(blowingService.OrgBoltNo), this, nameof(OrgBoltNo));
Misc.BindingOperations.SetBinding(this.blowingService, nameof(this.blowingService.OrgBoltNo), this, nameof(OrgBoltNo));
Misc.BindingOperations.SetBinding(heatBufService, nameof(heatBufService.CurrR), this, nameof(CurrR));
Misc.BindingOperations.SetBinding(this.heatBufService, nameof(this.heatBufService.CurrR), this, nameof(CurrR));
Misc.BindingOperations.SetBinding(feedbackHeatService, nameof(feedbackHeatService.LastChangedTime), this, nameof(LastChangedTime));
Misc.BindingOperations.SetBinding(this.feedbackHeatService, nameof(this.feedbackHeatService.LastChangedTime), this, nameof(LastChangedTime));
Misc.BindingOperations.SetBinding(heatCellService, nameof(heatCellService.Kp), this, nameof(Kp));
Misc.BindingOperations.SetBinding(this.heatCellService, nameof(this.heatCellService.Kp), this, nameof(Kp));
UpdateBestOrgBoltNo();
......@@ -156,7 +158,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
else if (e.PropertyName == nameof(OrgBoltNo))
{
UpdateBestOrgBoltNo();
UpdateIsONoDiff();
IsONoDiff = false;
}
else if (e.PropertyName == nameof(BestKp))
{
......@@ -165,7 +167,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
else if (e.PropertyName == nameof(Kp))
{
UpdateBestKp();
UpdateIsKpDiff();
IsKpDiff = false;
}
}
......@@ -175,11 +177,6 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
{
UpdateMsg();
}
else if (e.PropertyName == nameof(heatBufService.MaxR))
{
UpdateBestOrgBoltNo();
UpdateBestKp();
}
else if (e.PropertyName == nameof(heatBufService.BestOrgBoltNo))
{
UpdateBestOrgBoltNo();
......@@ -212,7 +209,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
IsONoDiff = false;
}
}
void UpdateBestKp()
bool UpdateBestKp()
{
if (heatBufService.MaxR > 0)
{
......@@ -222,12 +219,18 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
{
BestKp = Kp;
}
return false;
}
void UpdateIsKpDiff()
{
double p = Kp / BestKp;
if ((p > 1.5))
if (BestKp < Kp * 0.4)
{
//这个需要严重警告, Kp设得太大
IsKpDiff = true;
}
else if (BestKp > Kp * 3)
{
//这个Kp太小了, 提示一次吧,不然很慢
IsKpDiff = true;
}
else
......@@ -256,28 +259,8 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UiModule
}
}
public class DynAreaAirRingVmUt : INotifyPropertyChanged
public class DynAreaAirRingVmUt : DynAreaAirRingVm
{
public event PropertyChangedEventHandler PropertyChanged;
public int BestOrgBoltNo { get; set; }
public int OrgBoltNo { get; set; }
public bool IsONoDiff { get; set; }
public int BestKp { get; set; }
public int Kp { get; set; }
public bool IsKpDiff { get; set; }
public bool IsShowBest => IsKpDiff || IsONoDiff;
public double CurrR { get; set; }
public DateTime LastChangedTime { get; set; }
public string Msg { get; set; }
public bool IsShowBestOrgBoltNo { get; set; }
public RelayCommand OpenRecordCmd { get; }
}
......
......@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.1.0")]
[assembly: AssemblyFileVersion("7.0.1.0")]
[assembly: AssemblyVersion("7.4.0.0")]
[assembly: AssemblyFileVersion("7.4.0.0")]
[assembly: Guid("32104657-86E9-4380-9113-606589E6D812")]
......@@ -33,6 +33,21 @@ namespace FLY.FeedbackRenZiJia.Client
{
Call(nameof(GetStableFrame), new { id, isPre }, asyncDelegate, asyncContext);
}
/// <summary>
/// 以Id为起始点, 向前或者向后获取最近通道改变时间不相同的数据 或 起效数据
/// </summary>
/// <param name="id"></param>
/// <param name="isPre">向前</param>
/// <param name="isTakeEffect">数据起效</param>
/// <param name="isDiffHTime">加热不同</param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
[Call(typeof(GetFrameReponse))]
public void GetFrameAdv(long id, bool isPre, bool isTakeEffect, bool isDiffHTime, AsyncCBHandler asyncDelegate, object asyncContext)
{
Call(nameof(GetFrameAdv), new { id, isPre, isTakeEffect, isDiffHTime }, asyncDelegate, asyncContext);
}
}
}
......@@ -42,7 +42,10 @@ namespace FLY.FeedbackRenZiJia.Client
/// </summary>
public int Step { get; set; } = 5;
/// <summary>
/// 偏移量图, Y轴显示比例
/// </summary>
public double OffsetGraphYRangePercent { get; set; } = 3;
#endregion
......
......@@ -69,7 +69,7 @@ namespace FLY.FeedbackRenZiJia.Client
/// <summary>
/// 对位查找范围 默认 ±120°, 最大值 180°,最小值 50°
/// </summary>
public int SearchAngleRange { get; set; } = 120;
public int SearchRange { get; set; } = 120;
/// <summary>
/// 计算的最佳复位区号
/// </summary>
......
......@@ -21,6 +21,17 @@ namespace FLY.FeedbackRenZiJia.Client
/// </summary>
public double Kp { get; set; } = 3;
/// <summary>
/// 自动计算时,Kp最大值
/// </summary>
public double MaxKp { get; set; } = 5;
/// <summary>
/// 自动计算时,Kp最大值
/// </summary>
public double MinKp { get; set; } = 1;
/// <summary>
/// 平滑的阀值,只有超出阀值,才平滑
/// </summary>
......@@ -36,36 +47,28 @@ namespace FLY.FeedbackRenZiJia.Client
/// <summary>
/// 厚度控制线 , 厚度% 大于 厚度控制线 自动才会加热控制
/// </summary>
public int CtrlLine { get; set; }
public double CtrlLine { get; set; }
/// <summary>
/// 最大加热量 默认100%
/// </summary>
public int MaxHeat { get; set; }
#endregion
#region 对位
/// <summary>
/// 自动对位
/// </summary>
public bool IsAutoONo { get; set; }
/// <summary>
/// 当前正在自动对位模式
/// </summary>
public AutoONoStatusEnum AutoONoStatus { get; set; }
/// <summary>
/// 自动对位模式 信息
/// 分级控制线
/// </summary>
public string AutoONoMsg { get; set; }
public LvCtrlLine[] LvCtrlLines { get; set; }
/// <summary>
/// 自动对位 那幅空的图
/// 对厚度数据横向平滑 单位加热棒数。 特别的当Smooth = ChannelCnt/2 就是膜泡的偏心度
/// </summary>
public long AutoONoId0 { get; set; }
public int ThickSmoothRange { get; set; }
#endregion
#region 对位
/// <summary>
/// 自动对位 加热后生效的图
/// 自动对位
/// </summary>
public long AutoONoId1 { get; set; }
public bool IsAutoONo { get; set; }
#endregion
......@@ -76,6 +79,10 @@ namespace FLY.FeedbackRenZiJia.Client
/// </summary>
public double[] ThickPercents { get; set; }
/// <summary>
/// 当前 thickPercents 混合数
/// </summary>
public int CurrMix { get; set; }
/// <summary>
/// 当前方向的加热策略,必须保证 0~100
......
......@@ -2,18 +2,19 @@
using FLY.Thick.Blowing.IService;
using System;
using System.Collections.Generic;
using System.Linq;
namespace FLY.FeedbackRenZiJia.Common
{
public class FlyData_FeedbackHeat
public class ThickHeat2
{
public Lc_ThickHeat thickHeat;
/// <summary>
/// 稳定状态
/// 以前的数据
/// </summary>
public STABILITY Stability = STABILITY.IDLE;
public List<Lc_ThickHeat> thickHeats = new List<Lc_ThickHeat>();
/// <summary>
/// 厚度均值
......@@ -29,6 +30,47 @@ namespace FLY.FeedbackRenZiJia.Common
/// 大小 ChannelCnt, 均值为0
/// </summary>
public double[] HeatPercents;
public void Mix(ThickHeat2 older)
{
thickHeats.AddRange(older.thickHeats);
thickHeats.Add(thickHeat);
//更新ThickPercents
int z = thickHeat.Thicks.Count() / ThickPercents.Count();
double[] thickPercents_last;
//当两幅图复位区号不一致时,移动以前的数据,使之一致
if (older.thickHeat.OrgBoltNo != thickHeat.OrgBoltNo)
{
int move = (thickHeat.OrgBoltNo - older.thickHeat.OrgBoltNo) / z;
thickPercents_last = Common.MyMath.Move(older.ThickPercents, move);
}
else
{
thickPercents_last = older.ThickPercents;
}
for (int i = 0; i < ThickPercents.Count(); i++)
{
double old_v = thickPercents_last[i];
double v = ThickPercents[i];
int cnt = older.MixCnt;
if (!double.IsNaN(old_v))
{
if (!double.IsNaN(v))
{
ThickPercents[i] = (v + old_v * cnt) / (cnt + 1);
}
else
{
ThickPercents[i] = old_v;
}
}
}
}
public int MixCnt => thickHeats.Count() + 1;
}
......@@ -41,42 +83,42 @@ namespace FLY.FeedbackRenZiJia.Common
/// 待定,不知道!!
/// </summary>
IDLE = 0,
/// <summary>
/// 加热点,还没到达测厚仪。 其它状态都是加热已经起效了,顶多不稳定而已。
/// </summary>
ERROR_NO_ARRIVE = -1,
/// <summary>
/// 旋转次数太少,位置不能确定
/// </summary>
ERROR_POSITION_NOTSURE = -2,
/// <summary>
/// 一副数据,Sigma > 15% : 不稳定,变化太大,超出控制范围
/// </summary>
ERROR_SIGMA_OVERSIZE = -3,
/// <summary>
/// 连续两幅图旋转时间变化 > 10%:不稳定,旋转速度波动大,测量不准确
/// </summary>
ERROR_ROTATE_CHANGED = -4,
/// <summary>
/// 连续两幅图厚度均值变化 > 10%: 不稳定,厚度波动大
/// </summary>
ERROR_THICK_CHANGED = -5,
/// <summary>
/// 膜距离,旋转角度被改变,无法判断
/// </summary>
ERROR_PARAM_CHANGED = -7,
/// <summary>
/// 不稳定,不相关
/// </summary>
ERROR_CORREL = -6,
/// <summary>
/// 加热与厚度差,相关性很高
/// </summary>
OK_HEAT_AND_THICK_CORREL = 3,
/// <summary>
/// 加热为0,加热与厚度差,相关性很高
/// </summary>
......
......@@ -494,6 +494,56 @@ namespace FLY.FeedbackRenZiJia.Common
data2_move = mi;
}
/// <summary>
/// 通过data2 平移,找到与 data1 最相似的位置, data1 与 data2 必须大小一致
/// </summary>
/// <param name="data1"></param>
/// <param name="data2"></param>
/// <param name="range_percent">0~1</param>
/// <param name="offset"></param>
/// <param name="r"></param>
public static void CalBestMove(double[] data1, double[] data2, int range, out int data2_move, out double max_r)
{
if (data1.Length != data2.Length)
{
throw new Exception("CalBestMove() 参数错误 (data1.Length = " + data1.Length.ToString() + ")!=(data2.Length =" + data2.Length.ToString() + ")");
}
if (range > data1.Length / 2)
range = data1.Length / 2;
if (range <= 0)
range = 1;
double mr = 0;
int mi = -1;
for (int i = -range; i <= range; i++)
{
var data22 = Move(data2, i);
double r = Misc.MyMath.Correl(data1, data22);
if (mi == -1)
{
mr = r;
mi = i;
}
else
{
if (r > mr)
{
mr = r;
mi = i;
}
}
}
//找到了!!!
max_r = mr;
data2_move = mi;
}
/// <summary>
/// 平移
/// </summary>
......
......@@ -57,6 +57,7 @@
<Compile Include="IService\IBulkDbService.cs" />
<Compile Include="IService\IHeatBufService.cs" />
<Compile Include="IService\IFeedbackHeatService.cs" />
<Compile Include="IService\IPlcLinkExt.cs" />
<Compile Include="OBJ_INTERFACE\OBJ_INTERFACE_ID.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Server.OBJProxy\OBJProxy.cs" />
......@@ -75,6 +76,7 @@
<Compile Include="Server\Model\LcTable.cs" />
<Compile Include="Server\Model\Lc_AutoMapperProfile.cs" />
<Compile Include="Server\PLCLink.cs" />
<Compile Include="Server\PlcLinkExt.cs" />
<Compile Include="Server\SysParam.cs" />
<Compile Include="Server\TDGage.cs" />
</ItemGroup>
......
......@@ -34,10 +34,22 @@ namespace FLY.FeedbackRenZiJia.IService
/// <param name="asyncContext"></param>
[Call(typeof(GetStableFrameReponse))]
void GetStableFrame(long id, bool isPre, AsyncCBHandler asyncDelegate, object asyncContext);
/// <summary>
/// 以Id为起始点, 向前或者向后获取最近通道改变时间不相同的数据 或 起效数据
/// </summary>
/// <param name="id"></param>
/// <param name="isPre">向前</param>
/// <param name="isTakeEffect">数据起效</param>
/// <param name="isDiffHTime">加热不同</param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
[Call(typeof(GetFrameReponse))]
void GetFrameAdv(long id, bool isPre, bool isTakeEffect, bool isDiffHTime, AsyncCBHandler asyncDelegate, object asyncContext);
}
public class GetFrameReponse
{
public long Id;
public long id;
public Lc_ThickHeat thickHeat;
}
public class GetStableFrameReponse
......
......@@ -41,6 +41,10 @@ namespace FLY.FeedbackRenZiJia.IService
/// </summary>
int Step { get; set; }
/// <summary>
/// 偏移量图, Y轴显示比例
/// </summary>
double OffsetGraphYRangePercent { get; set; }
#endregion
#region 动态数据
......
......@@ -49,9 +49,9 @@ namespace FLY.FeedbackRenZiJia.IService
#region 对位
/// <summary>
/// 对位查找范围 默认 ±120°, 最大值 180°,最小值 10°
/// 对位查找范围 默认 ±10个分区号, 最大值 总分区号的一半,最小值 5个分区号
/// </summary>
int SearchAngleRange { get; set; }
int SearchRange { get; set; }
/// <summary>
/// 计算的最佳复位区号
/// </summary>
......
......@@ -14,6 +14,15 @@ namespace FLY.FeedbackRenZiJia.IService
/// HeatOffset = ThickPercent * Kp
/// </summary>
double Kp { get; set; }
/// <summary>
/// 自动计算时,Kp最大值
/// </summary>
double MaxKp { get; set; }
/// <summary>
/// 自动计算时,Kp最大值
/// </summary>
double MinKp { get; set; }
/// <summary>
/// 输出平滑的阀值,只有超出阀值,才平滑
......@@ -28,37 +37,28 @@ namespace FLY.FeedbackRenZiJia.IService
/// <summary>
/// 厚度控制线 , 厚度% 大于 厚度控制线 自动才会加热控制
/// </summary>
int CtrlLine { get; set; }
double CtrlLine { get; set; }
/// <summary>
/// 最大加热量 默认100%
/// </summary>
int MaxHeat { get; set; }
#endregion
#region 对位
/// <summary>
/// 自动对位
/// 分级控制线
/// </summary>
bool IsAutoONo { get; set; }
LvCtrlLine[] LvCtrlLines { get; set; }
/// <summary>
/// 当前正在自动对位模式
/// </summary>
AutoONoStatusEnum AutoONoStatus { get; }
/// <summary>
/// 自动对位模式 信息
/// 对厚度数据横向平滑 单位加热棒数。 特别的当Smooth = ChannelCnt/2 就是膜泡的偏心度
/// </summary>
string AutoONoMsg { get; }
/// <summary>
/// 自动对位 那幅空的图
/// </summary>
long AutoONoId0 { get; }
int ThickSmoothRange { get; set; }
#endregion
#region 对位
/// <summary>
/// 自动对位 加热后生效的图
/// 自动对位
/// </summary>
long AutoONoId1 { get; }
bool IsAutoONo { get; set; }
#endregion
#region 状态
......@@ -67,6 +67,13 @@ namespace FLY.FeedbackRenZiJia.IService
/// </summary>
double[] ThickPercents { get; }
/// <summary>
/// 当前 thickPercents 混合数
/// </summary>
int CurrMix { get; }
/// <summary>
/// 当前方向的加热策略,必须保证 0~100
/// </summary>
......@@ -87,6 +94,7 @@ namespace FLY.FeedbackRenZiJia.IService
/// </summary>
double MaxHeatSigma { get; }
#endregion
#region 功能
......@@ -135,23 +143,13 @@ namespace FLY.FeedbackRenZiJia.IService
#endregion
}
public enum AutoONoStatusEnum
/// <summary>
/// 分级控制线
/// </summary>
public class LvCtrlLine : INotifyPropertyChanged
{
/// <summary>
/// 等待 没有加热,厚度稳定
/// </summary>
Init,
/// <summary>
/// 厚度已经稳定,对位加热, 等待结果
/// </summary>
Step2,
/// <summary>
/// 成功找到准确的复位区号与Kp
/// </summary>
Success,
/// <summary>
/// 失败,对位过程有大波动
/// </summary>
Fail
public event PropertyChangedEventHandler PropertyChanged;
public double CtrlLine { get; set; }
public int Mix { get; set; }
}
}
......@@ -8,17 +8,11 @@ using System.Collections.ObjectModel;
namespace FLY.FeedbackRenZiJia.Server
{
public interface IPLCLink:INotifyPropertyChanged
public interface IPLCLink : INotifyPropertyChanged
{
#region 输出
/// <summary>
/// 加热通道数
/// </summary>
UInt16 ChannelCnt { get; set; }
/// <summary>
/// 加热量更新 写
/// </summary>
UInt16 HeatUpdate { get; set; }
void SetChannelCnt(UInt16 channelCnt);
void SetHeatUpdate(UInt16 heatUpdate);
/// <summary>
/// 设置加热量
/// </summary>
......@@ -43,8 +37,7 @@ namespace FLY.FeedbackRenZiJia.Server
#endregion
#region 状态
int Errno { get; set; }
bool IsConnected { get; }
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FLY.FeedbackRenZiJia.IService
{
public interface IPlcLinkExt : INotifyPropertyChanged
{
#region 当前值
/// <summary>
/// 当前电流 有没?
/// </summary>
bool HasElectricity { get; }
/// <summary>
/// 风机是否启动?
/// </summary>
bool HasFan { get; }
bool IsConnected { get; }
#endregion
#region 输出
void SetChannelCnt(int channelCnt);
/// <summary>
/// 设置加热量
/// </summary>
/// <param name="values"></param>
void SetHeats(IEnumerable<double> values);
#endregion
}
}
......@@ -83,12 +83,12 @@ namespace FLY.FeedbackRenZiJia.Server
/// </summary>
void RegToPropertyNameInit()
{
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.COIL, ADDR_M_HasElectricCurrent, 1, "HasElectricity"));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.COIL, ADDR_M_HasFan, 1, "HasFan"));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.COIL, ADDR_M_HasElectricCurrent, 1, nameof(HasElectricity)));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.COIL, ADDR_M_HasFan, 1, nameof(HasFan)));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.REG, ADDR_D_ChannelCnt, 1, "ChannelCnt"));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.REG, ADDR_D_HeatUpdate, 1, "HeatUpdate_R"));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.REG, ADDR_D_CurrUpdate, 1, "CurrUpdate"));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.REG, ADDR_D_ChannelCnt, 1, nameof(ChannelCnt)));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.REG, ADDR_D_HeatUpdate, 1, nameof(HeatUpdate_R)));
rpn.Add(new RegToPropertyName(PLCRegister.RegChangedEventArgs.REG_TYPE.REG, ADDR_D_CurrUpdate, 1, nameof(CurrUpdate)));
}
public void OnPoll()
......@@ -97,23 +97,19 @@ namespace FLY.FeedbackRenZiJia.Server
if (DateTime.Now.Subtract(modbusserver.LastCommDT).TotalSeconds > 3)
{
//有3秒没通讯
Errno = -1;
IsConnected = false;
}
else
{
Errno = 0;
IsConnected = true;
}
}
#region PLCLink 成员
#region 状态
/// <summary>
/// -1 HMI 没有连接到 本服务器; -2 串口打开异常
/// </summary>
public int Errno { get; set; } = -1;
public int RetCode { get; set; }
public bool IsConnected { get; private set; }
#endregion
......@@ -137,6 +133,18 @@ namespace FLY.FeedbackRenZiJia.Server
return mPLCRegs.GetBool(ADDR_M_HasFan);
}
}
public void SetChannelCnt(UInt16 channelCnt)
{
ChannelCnt = channelCnt;
}
public void SetHeatUpdate(UInt16 heatUpdate)
{
HeatUpdate = heatUpdate;
}
public ushort ChannelCnt
{
get
......
......@@ -203,7 +203,7 @@ namespace FLY.FeedbackRenZiJia.Server
private void HeatCheck_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Enable")
if (e.PropertyName == nameof(Enable))
{
if (Enable)
Start();
......@@ -214,7 +214,7 @@ namespace FLY.FeedbackRenZiJia.Server
void mHeatCell_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "ChannelCnt")
if (e.PropertyName == nameof(mHeatCell.ChannelCnt))
{
Init();
Load();
......@@ -236,7 +236,7 @@ namespace FLY.FeedbackRenZiJia.Server
CheckStep = 0;
counter = 0;
Array.Clear(Bads, 0, Bads.Count());
NotifyPropertyChanged("Bads");
NotifyPropertyChanged(nameof(Bads));
OpenCircuit = false;
PowerOff = false;
ShortCircuit = false;
......@@ -269,7 +269,7 @@ namespace FLY.FeedbackRenZiJia.Server
else
Bads[i] = false;
}
NotifyPropertyChanged("Bads");
NotifyPropertyChanged(nameof(Bads));
OpenCircuit = Bads.Any(b => b);
}
......
......@@ -54,7 +54,7 @@ namespace FLY.FeedbackRenZiJia.Server.Model
public void GetFrame(long Id, AsyncCBHandler asyncDelegate, object asyncContext)
{
GetFrameReponse reponse = new GetFrameReponse();
reponse.Id = Id;
reponse.id = Id;
Task.Factory.StartNew(() =>
{
......@@ -139,5 +139,88 @@ namespace FLY.FeedbackRenZiJia.Server.Model
asyncDelegate(asyncContext, reponse);
}
/// <summary>
/// 以Id为起始点, 向前或者向后获取最近通道改变时间不相同的数据 或 起效数据
/// </summary>
/// <param name="id"></param>
/// <param name="isPre">向前</param>
/// <param name="isTakeEffect">数据起效</param>
/// <param name="isDiffHTime">加热不同</param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
//[Call(typeof(GetFrameReponse))]
public async void GetFrameAdv(long id, bool isPre, bool isTakeEffect, bool isDiffHTime, AsyncCBHandler asyncDelegate, object asyncContext)
{
var reponse = new GetFrameReponse();
reponse.id = id;
//会慢,需要分个线程独立做这事
await Task.Factory.StartNew(() =>
{
if (id <= 0)
{
//先获取真实ID
string sql =
$"SELECT {nameof(Db_ThickHeat.ID)} FROM { dbModel.TbThickHeat.TableName}" +
$" ORDER BY {nameof(Db_ThickHeat.ID)} DESC" +
$" LIMIT 1 OFFSET {-id}";
var ret = dbModel.sqliteHelper.ExecuteScalar(sql);
if (ret == DBNull.Value)
return;
id = Convert.ToInt32(ret);
}
string ctime_str = "";
if (isDiffHTime)
{
DateTime ctime;
//获取对应ID 的 通道改变时间
{
string sql =
$"SELECT {nameof(Db_ThickHeat.HTime)} FROM { dbModel.TbThickHeat.TableName}" +
$" WHERE {nameof(Db_ThickHeat.ID)} = {id}";
var ret = dbModel.sqliteHelper.ExecuteScalar(sql);
if (ret == DBNull.Value)
return;
ctime = Convert.ToDateTime(ret);
}
ctime_str = ctime.ToStringOfSQLiteFieldType();
}
List<Db_ThickHeat> db_thickHeats = null;
{
string condition = "";
string symbol = isPre ? "<" : ">";
condition += $"WHERE {nameof(Db_ThickHeat.ID)}{symbol}{id}";
if (isDiffHTime)
condition += $" AND {nameof(Db_ThickHeat.HTime)}<>{ctime_str}";
if (isTakeEffect)
condition += $" AND {nameof(Db_ThickHeat.IsStable)}=TRUE";
condition += $" ORDER BY {nameof(Db_ThickHeat.ID)}";
if (isPre)
condition += " DESC";
condition += " LIMIT 1";
db_thickHeats = dbModel.TbThickHeat.Find(condition);
}
if (db_thickHeats.Count() == 0)
{
return;
}
var lc_thickHeat = Lc_AutoMapperProfile.Mapper.Map<Lc_ThickHeat>(db_thickHeats.First());
reponse.thickHeat = lc_thickHeat;
});
asyncDelegate(asyncContext, reponse);
}
}
}
......@@ -40,17 +40,6 @@ namespace FLY.FeedbackRenZiJia.Server
/// </summary>
public TimeSpan ActUpdateInterval { get; private set; }
/// <summary>
/// 加热通道数
/// </summary>
[DoNotCheckEquality]
public UInt16 ChannelCnt { get; set; }
/// <summary>
/// 加热量更新
/// </summary>
[DoNotCheckEquality]
public UInt16 HeatUpdate { get; set; }
/// <summary>
/// 当前电流 有没?
......@@ -65,8 +54,7 @@ namespace FLY.FeedbackRenZiJia.Server
/// </summary>
public UInt16 HeatUpdate_R { get; private set; }
public int Errno { get; set; } = -1;
public bool IsConnected { get; private set; }
public event PropertyChangedEventHandler PropertyChanged;
......@@ -84,7 +72,6 @@ namespace FLY.FeedbackRenZiJia.Server
public PLCLink(IPEndPoint ep)
{
mclient = new Modbus.WithThread.ClientTCP(ep);
this.PropertyChanged += PLCLink_PropertyChanged;
}
class RegWrite
......@@ -102,30 +89,31 @@ namespace FLY.FeedbackRenZiJia.Server
}
List<RegWrite> rws = new List<RegWrite>();
private void PLCLink_PropertyChanged(object sender, PropertyChangedEventArgs e)
public void SetChannelCnt(UInt16 channelCnt)
{
if (e.PropertyName == "ChannelCnt")
if (!IsConnected)
return;
//D200 4x201 通道数量
RegWrite regWrite = new RegWrite(PLCAddressArea.Register, 200, new UInt16[] { channelCnt });
lock (rws)
{
//D200 4x201 通道数量
RegWrite regWrite = new RegWrite(PLCAddressArea.Register, 200, new UInt16[] { ChannelCnt });
lock (rws)
{
rws.Add(regWrite);
}
rws.Add(regWrite);
}
else if (e.PropertyName == "HeatUpdate")
}
public void SetHeatUpdate(UInt16 heatUpdate)
{
if (!IsConnected)
return;
//D201 4x202 设置值 更新
RegWrite regWrite = new RegWrite(PLCAddressArea.Register, 201, new UInt16[] { heatUpdate });
lock (rws)
{
//D201 4x202 设置值 更新
RegWrite regWrite = new RegWrite(PLCAddressArea.Register, 201, new UInt16[] { HeatUpdate });
lock (rws)
{
rws.Add(regWrite);
}
rws.Add(regWrite);
}
}
public void Start()
{
lock (this)
......@@ -196,9 +184,9 @@ namespace FLY.FeedbackRenZiJia.Server
goto _error;//连接断开,终止更新线程
}
IsConnected = true;
}
//输出写入数据
if (!UpdateWriteData())
{
......@@ -207,18 +195,18 @@ namespace FLY.FeedbackRenZiJia.Server
goto _error;//连接断开,终止更新线程
}
Errno = 0;
Thread.Sleep(30);
}
_error:
Errno = -1;
IsConnected = false;
ErrorCnt++;
goto _connect;
_end:
mclient.Close();
Errno = -1;
IsConnected = true;
IsRunning = false;
}
......@@ -236,7 +224,7 @@ namespace FLY.FeedbackRenZiJia.Server
return false;
HeatUpdate_R = values2.ElementAt(0);
return true;
}
......@@ -270,6 +258,9 @@ namespace FLY.FeedbackRenZiJia.Server
/// <param name="values"></param>
public void SetHeat(IEnumerable<UInt16> values)
{
if (!IsConnected)
return;
UInt16[] buf = values.ToArray();
List<RegWrite> writes = new List<RegWrite>();
//D400 4x401 设置值 160个
......@@ -285,7 +276,7 @@ namespace FLY.FeedbackRenZiJia.Server
cnt1 = MaxRegsOfOneRead;
UInt16[] buf1 = new UInt16[cnt1];
Array.Copy(buf, offset, buf1, 0, cnt1);
RegWrite rw = new RegWrite(PLCAddressArea.Register, addr+offset, buf1);
RegWrite rw = new RegWrite(PLCAddressArea.Register, addr + offset, buf1);
writes.Add(rw);
offset += cnt1;
cnt -= cnt1;
......
using FLY.FeedbackRenZiJia.IService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Threading;
namespace FLY.FeedbackRenZiJia.Server
{
/// <summary>
/// PlcLink 只有 1~100, 最小单位1, 扩展它, 1~100, 最小单位 0.1
/// </summary>
public class PlcLinkExt : IPlcLinkExt
{
/// <summary>
/// 每颗粒时间 5s
/// </summary>
const int CellSec = 3;
/// <summary>
/// 占空比,总颗粒数
/// </summary>
const int DutyCount = 10;
int channelCnt = 96;
double[] heats;
/// <summary>
/// 当前电流 有没?
/// </summary>
public bool HasElectricity { get; private set; }
/// <summary>
/// 风机是否启动?
/// </summary>
public bool HasFan { get; private set; }
public bool IsConnected { get; private set; }
public event PropertyChangedEventHandler PropertyChanged;
IPLCLink plcLink;
DispatcherTimer timer;
Stopwatch stopwatch;
int dutyIndex = 0;
public PlcLinkExt()
{
}
public void Init(IPLCLink plcLink)
{
this.plcLink = plcLink;
Misc.BindingOperations.SetBinding(plcLink, nameof(plcLink.IsConnected), this, nameof(IsConnected));
Misc.BindingOperations.SetBinding(plcLink, nameof(plcLink.HasElectricity), this, nameof(HasElectricity));
Misc.BindingOperations.SetBinding(plcLink, nameof(plcLink.HasFan), this, nameof(HasFan));
this.PropertyChanged += PlcLinkExt_PropertyChanged;
timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(1);
timer.Tick += Timer_Tick;
stopwatch = new Stopwatch();
if (plcLink.IsConnected)
{
//刚连上,把 之前的数据都重新发给它。
plcLink.SetChannelCnt((UInt16)channelCnt);
DutyStart();
}
}
void DutyStart()
{
stopwatch.Restart();
timer.Start();
dutyIndex = 0;
setHeats();
}
void DutyStop()
{
stopwatch.Stop();
timer.Stop();
}
void setHeats()
{
if (!plcLink.IsConnected)
return;
if (heats == null)
return;
UInt16[] plcHeats = heats.Select(h =>
{
int h_int = (int)h;
int v = (int)((h - h_int) * DutyCount);
if (v > dutyIndex)
{
return (UInt16)(h_int + 1);
}
else
{
return (UInt16)h_int;
}
}).ToArray();
plcLink.SetHeat(plcHeats);
UInt16 heatupdate = (UInt16)(plcLink.HeatUpdate_R + 1);
if (heatupdate > 100)
heatupdate = 1;
plcLink.SetHeatUpdate(heatupdate);
}
private void Timer_Tick(object sender, EventArgs e)
{
if (stopwatch.Elapsed < TimeSpan.FromSeconds(CellSec))
{
return;
}
stopwatch.Restart();
setHeats();
dutyIndex++;
if (dutyIndex > DutyCount)
dutyIndex = 0;
}
private void PlcLinkExt_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(plcLink.IsConnected))
{
if (plcLink.IsConnected)
{
//刚连上,把 之前的数据都重新发给它。
plcLink.SetChannelCnt((UInt16)channelCnt);
DutyStart();
}
else
{
DutyStop();
}
}
}
public void SetChannelCnt(int channelCnt)
{
this.channelCnt = channelCnt;
plcLink.SetChannelCnt((UInt16)channelCnt);
}
/// <summary>
/// 设置加热量
/// </summary>
/// <param name="values"></param>
public void SetHeats(IEnumerable<double> values)
{
heats = values.Select(h =>
{
if (h < 0) h = 0;
else if (h > 100) h = 100;
return h;
}).ToArray();
setHeats();
}
}
}
......@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.7")]
[assembly: AssemblyFileVersion("7.0.7")]
[assembly: AssemblyVersion("7.4.0")]
[assembly: AssemblyFileVersion("7.4.0")]
[assembly: Guid("D12087A7-EEC4-4D9F-9269-8F20324F4B04")]
......@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.9")]
[assembly: AssemblyFileVersion("7.0.9")]
[assembly: AssemblyVersion("7.1.0")]
[assembly: AssemblyFileVersion("7.1.0")]
[assembly: Guid("72FBA808-FA10-43BF-8504-C6E814E031E7")]
......@@ -176,14 +176,22 @@
<Compile Include="UiModule\TrendGraph2\TrendGraph2.xaml.cs">
<DependentUpon>TrendGraph2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\TrendGraph2\TrendGraphConfig2.xaml.cs">
<DependentUpon>TrendGraphConfig2.xaml</DependentUpon>
<Compile Include="UiModule\TrendGraph2\TrendGraph2Config.xaml.cs">
<DependentUpon>TrendGraph2Config.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\TrendGraph2\TrendGraphItemParam2.cs" />
<Compile Include="UiModule\TrendGraph2\TrendGraphParam2s.cs" />
<Compile Include="UiModule\TrendGraph2\TrendGraphVm2.cs" />
<Compile Include="UiModule\TrendGraph2\TrendGraphVm2Ut.cs" />
<Compile Include="UiModule\TrendGraph2\UiModule2_TrendGraph.cs" />
<Compile Include="UiModule\TrendGraph2\TrendGraph2Vm.cs" />
<Compile Include="UiModule\TrendGraph2\UiModule2_TrendGraph2.cs" />
<Compile Include="UiModule\TrendGraph\TrendGraph.xaml.cs">
<DependentUpon>TrendGraph.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\TrendGraph\TrendGraphConfig.xaml.cs">
<DependentUpon>TrendGraphConfig.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\TrendGraph\TrendGraphItemParam.cs" />
<Compile Include="UiModule\TrendGraph\TrendGraphParams.cs" />
<Compile Include="UiModule\TrendGraph\TrendGraphVm.cs" />
<Compile Include="UiModule\TrendGraph\TrendGraphVmUt.cs" />
<Compile Include="UiModule\TrendGraph\UiModule2_TrendGraph.cs" />
<Page Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......@@ -268,7 +276,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\TrendGraph2\TrendGraphConfig2.xaml">
<Page Include="UiModule\TrendGraph2\TrendGraph2Config.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\TrendGraph\TrendGraph.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UiModule\TrendGraph\TrendGraphConfig.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
......
......@@ -17,10 +17,12 @@
<!--MahApps.Brushes.Accent-->
<SolidColorBrush x:Key="Brushes.ChartArea0" Color="#CC60A917" />
<!--MahApps.Brushes.ValidationSummary4-->
<SolidColorBrush x:Key="Brushes.ChartArea1" Color="#CCFDC8C8"/>
<SolidColorBrush x:Key="Brushes.ChartArea1" Color="#cce5004f"/>
<!--#cceb6100"-->
<!--MahApps.Brushes.ValidationSummary2-->
<SolidColorBrush x:Key="Brushes.ChartArea2" Color="#CCCA000C" />
<SolidColorBrush x:Key="Brushes.ChartArea2" Color="#CCa40000" />
<SolidColorBrush x:Key="Brushes.ChartArea3" Color="#CCA59F93" />
<SolidColorBrush x:Key="Brushes.ChartArea4" Color="#22000000" />
......@@ -28,9 +30,9 @@
<!--MahApps.Brushes.Accent-->
<SolidColorBrush x:Key="Brushes.ChartAxisLabel0" Color="#FF60A917" />
<!--MahApps.Brushes.ValidationSummary5-->
<SolidColorBrush x:Key="Brushes.ChartAxisLabel1" Color="#FFFD7070"/>
<SolidColorBrush x:Key="Brushes.ChartAxisLabel1" Color="#FFe5004f"/> <!--#FFFD7070-->
<!--MahApps.Brushes.ValidationSummary2-->
<SolidColorBrush x:Key="Brushes.ChartAxisLabel2" Color="#FFCA000C" />
<SolidColorBrush x:Key="Brushes.ChartAxisLabel2" Color="#FFa40000" /> <!--#FFCA000C-->
<SolidColorBrush x:Key="Brushes.ChartAxisLabel3" Color="#FFA59F93" />
......
......@@ -3,17 +3,10 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
<!--<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>-->
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/GraphStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--扫描图,纵向趋势图Y轴 标签-->
<Style x:Key="AxisSectionStyle" TargetType="lvc:AxisSection" >
<Setter Property="StrokeThickness" Value="1"/>
<Setter Property="DataLabel" Value="True"/>
<Setter Property="DisableAnimations" Value="True"/>
<Setter Property="DataLabelForeground" Value="White"/>
<Setter Property="Opacity" Value="0.5"/>
<Setter Property="Panel.ZIndex" Value="1"/>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -48,7 +48,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
return;
WdScanGraphConfig window = new WdScanGraphConfig();
window.Init(graphparam);
window.Init(graphparam,viewModel);
window.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
window.ShowDialog();
}
......
......@@ -18,7 +18,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
/// </summary>
public double YRangePercent { get; set; } = 3;
private int mix = 2;
private int mix = 1;
/// <summary>
/// 混合数
/// </summary>
......
......@@ -47,7 +47,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
return;
WdScanGraphConfig window = new WdScanGraphConfig();
window.Init(graphparam);
window.Init(graphparam, viewModel);
window.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
window.ShowDialog();
}
......
......@@ -14,7 +14,6 @@ namespace FLY.Thick.Blowing.UI.UiModule
{
ScanGraphCircularVm viewModel;
ScanGraphCircularParam graphparam;
ParamDictionary paramDictionary;
public ScanGraphCircular()
{
InitializeComponent();
......@@ -24,7 +23,6 @@ namespace FLY.Thick.Blowing.UI.UiModule
public void Init(int id, IUnityContainer container,
IBulkDbService bulkDbService, IBlowingService blowingService, IBlowingFixProfileService blowingProfileService, ParamDictionary paramDictionary)
{
this.paramDictionary = paramDictionary;
//查找参数
graphparam = ScanGraphCircularParams.Current.Items.Find(p => p.ID == id);
if (graphparam == null)
......@@ -49,7 +47,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
return;
WdScanGraphCircularConfig window = new WdScanGraphCircularConfig();
window.Init(graphparam, paramDictionary);
window.Init(graphparam, viewModel);
window.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
window.ShowDialog();
}
......
......@@ -10,7 +10,7 @@ namespace FLY.Thick.Blowing.UI.UiModule
/// <summary>
/// 纵向图的参数
/// </summary>
public class TrendGraphItemParam2 : UIModuleParam
public class TrendGraphItemParam : UIModuleParam
{
private int interval = 1;
/// <summary>
......
No preview for this file type
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment