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

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

parent 37103d64
......@@ -56,6 +56,16 @@
<StackPanel Orientation="Horizontal">
<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.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 Margin="{StaticResource ControlMargin}" >
......
......@@ -73,7 +73,15 @@ namespace FLY.Thick.FilmCasting.UI
public int Smooth { get; set; }
#endregion
/// <summary>
/// 模头总长 mm BoltCnt*BoltWidth
/// </summary>
public double DieLength { get; private set; }
/// <summary>
/// 扫描架总长 mm
/// </summary>
public double FrameLength { get; private set; }
#region profile
/// <summary>
......@@ -118,21 +126,21 @@ namespace FLY.Thick.FilmCasting.UI
}
public void Init(
IBoltMapFilmCastingService boltMapCalenderService,
IInitParamService initParamService,
IBorderSearchService borderSearchService,
IFilmCastingProfileService filmCastingProfileService)
IBoltMapFilmCastingService _boltMapFilmCastingService,
IInitParamService _initParamService,
IBorderSearchService _borderSearchService,
IFilmCastingProfileService _filmCastingProfileService)
{
this.boltMapFilmCastingService = boltMapCalenderService;
this.initParamService = initParamService;
this.borderSearchService = borderSearchService;
this.filmCastingProfileService = filmCastingProfileService;
this.boltMapFilmCastingService = _boltMapFilmCastingService;
this.initParamService = _initParamService;
this.borderSearchService = _borderSearchService;
this.filmCastingProfileService = _filmCastingProfileService;
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.IsReversed), this, nameof(IsReversed));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.BoltWidth), this, nameof(BoltWidth));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.BoltCnt), this, nameof(BoltCnt));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.Smooth), this, nameof(Smooth));
Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.IsReversed), this, nameof(IsReversed));
Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.BoltWidth), this, nameof(BoltWidth));
Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.BoltCnt), this, nameof(BoltCnt));
Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.Smooth), this, nameof(Smooth));
var param = this.filmCastingProfileService.Param;
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.LeftEmptyBolts), this, nameof(LeftEmptyBolts));
......@@ -141,6 +149,14 @@ namespace FLY.Thick.FilmCasting.UI
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.MidOffset), this, nameof(MidOffset));
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()
......
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