Commit cb9d12df authored by 潘栩锋's avatar 潘栩锋 🚴

添加 分区表显示模头长度,机架长度,方便试机时,不设太多螺丝数量

parent 37103d64
...@@ -56,6 +56,16 @@ ...@@ -56,6 +56,16 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding BoltCnt}" /> <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding BoltCnt}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="个"/> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="个"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
<StackPanel>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
模头总长=<Run Text="{Binding DieLength,StringFormat={}{0:F0},Mode=OneWay}"/>mm
</TextBlock>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
机架总长=<Run Text="{Binding FrameLength,StringFormat={}{0:F0},Mode=OneWay}"/>mm
</TextBlock>
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" > <StackPanel Margin="{StaticResource ControlMargin}" >
......
...@@ -73,7 +73,15 @@ namespace FLY.Thick.FilmCasting.UI ...@@ -73,7 +73,15 @@ namespace FLY.Thick.FilmCasting.UI
public int Smooth { get; set; } public int Smooth { get; set; }
#endregion #endregion
/// <summary>
/// 模头总长 mm BoltCnt*BoltWidth
/// </summary>
public double DieLength { get; private set; }
/// <summary>
/// 扫描架总长 mm
/// </summary>
public double FrameLength { get; private set; }
#region profile #region profile
/// <summary> /// <summary>
...@@ -118,21 +126,21 @@ namespace FLY.Thick.FilmCasting.UI ...@@ -118,21 +126,21 @@ namespace FLY.Thick.FilmCasting.UI
} }
public void Init( public void Init(
IBoltMapFilmCastingService boltMapCalenderService, IBoltMapFilmCastingService _boltMapFilmCastingService,
IInitParamService initParamService, IInitParamService _initParamService,
IBorderSearchService borderSearchService, IBorderSearchService _borderSearchService,
IFilmCastingProfileService filmCastingProfileService) IFilmCastingProfileService _filmCastingProfileService)
{ {
this.boltMapFilmCastingService = boltMapCalenderService; this.boltMapFilmCastingService = _boltMapFilmCastingService;
this.initParamService = initParamService; this.initParamService = _initParamService;
this.borderSearchService = borderSearchService; this.borderSearchService = _borderSearchService;
this.filmCastingProfileService = filmCastingProfileService; this.filmCastingProfileService = _filmCastingProfileService;
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.IsReversed), this, nameof(IsReversed)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.IsReversed), this, nameof(IsReversed));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.BoltWidth), this, nameof(BoltWidth)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.BoltWidth), this, nameof(BoltWidth));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.BoltCnt), this, nameof(BoltCnt)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.BoltCnt), this, nameof(BoltCnt));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.Smooth), this, nameof(Smooth)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.Smooth), this, nameof(Smooth));
var param = this.filmCastingProfileService.Param; var param = this.filmCastingProfileService.Param;
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.LeftEmptyBolts), this, nameof(LeftEmptyBolts)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.LeftEmptyBolts), this, nameof(LeftEmptyBolts));
...@@ -140,7 +148,15 @@ namespace FLY.Thick.FilmCasting.UI ...@@ -140,7 +148,15 @@ namespace FLY.Thick.FilmCasting.UI
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.UniformShrinkPercent), this, nameof(UniformShrinkPercent)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.UniformShrinkPercent), this, nameof(UniformShrinkPercent));
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.MidOffset), this, nameof(MidOffset)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.MidOffset), this, nameof(MidOffset));
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.PName), this, nameof(PName)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.PName), this, nameof(PName));
Misc.BindingOperations.SetBinding(this, new string[] { nameof(BoltWidth), nameof(BoltCnt) },()=>{
DieLength = BoltWidth * BoltCnt;
});
Misc.BindingOperations.SetBinding(initParamService, new string[] { nameof(IInitParamService.PosLength), nameof(IInitParamService.Encoder1_mmpp) }, () =>
{
FrameLength = initParamService.PosLength * initParamService.Encoder1_mmpp;
});
} }
private void Apply() private void Apply()
......
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