Commit 45bb6303 authored by 潘栩锋's avatar 潘栩锋 🚴

添加 完成机架修正的 关键点插入方式拟合

parent 94bbae44
...@@ -293,16 +293,31 @@ ...@@ -293,16 +293,31 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Button Content="添加" Command="{Binding AddKeyPointModeCmd}" Style="{StaticResource Styles.Button.Square2}"/> <Button Content="添加" Command="{Binding AddKeyPointModeCmd}" >
<Button Content="删除" Command="{Binding RemoveKeyPointModeCmd}" Style="{StaticResource Styles.Button.Square2}" />
<Button Content="移动" Command="{Binding MoveKeyPointModeCmd}" Style="{StaticResource Styles.Button.Square2}" />
<Button Content="生成" Command="{Binding CreateCorrByKeyPointCmd}" >
<Button.Style> <Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Square.Accent2}"> <Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Square2}">
<Style.Triggers>
<DataTrigger Binding="{Binding KpSelectMode}" Value="{x:Static local:KeyPointsSelectMode.Add}" >
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style> </Style>
</Button.Style> </Button.Style>
</Button> </Button>
<Button Content="删除" Command="{Binding RemoveKeyPointModeCmd}" >
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Square2}">
<Style.Triggers>
<DataTrigger Binding="{Binding KpSelectMode}" Value="{x:Static local:KeyPointsSelectMode.Remove}" >
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Style="{StaticResource Styles.Button.Square.Accent2}"
Content="生成" Command="{Binding CreateCorrByKeyPointCmd}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
......
...@@ -78,7 +78,7 @@ namespace FLY.Thick.Base.UI ...@@ -78,7 +78,7 @@ namespace FLY.Thick.Base.UI
//pEnd = closetsPoint; //pEnd = closetsPoint;
pEnd = p; pEnd = p;
vm.Select(pBegin, pEnd); vm.Select(PgScanCorrVm.SelectType.Move, pBegin, pEnd);
} }
...@@ -105,7 +105,7 @@ namespace FLY.Thick.Base.UI ...@@ -105,7 +105,7 @@ namespace FLY.Thick.Base.UI
//} //}
//cpBegin = closetsPoint; //cpBegin = closetsPoint;
vm.Select(pBegin, pBegin); vm.Select(PgScanCorrVm.SelectType.Click, pBegin, pBegin);
} }
private void UIElement_MouseUp(object sender, MouseButtonEventArgs e) private void UIElement_MouseUp(object sender, MouseButtonEventArgs e)
...@@ -132,7 +132,7 @@ namespace FLY.Thick.Base.UI ...@@ -132,7 +132,7 @@ namespace FLY.Thick.Base.UI
//if (closetsPoint == null) //if (closetsPoint == null)
// return; // return;
pEnd = p; pEnd = p;
vm.Select(pBegin, pEnd); vm.Select(PgScanCorrVm.SelectType.Cancel, pBegin, pEnd);
} }
} }
......
...@@ -132,27 +132,10 @@ namespace FLY.Thick.Base.UI ...@@ -132,27 +132,10 @@ namespace FLY.Thick.Base.UI
#endregion #endregion
#region 关键点方式生成修正曲线 #region 关键点方式生成修正曲线
/// <summary>
/// 关键点列表,单位grid
/// </summary>
public ObservableCollection<int> KeyPoints = new ObservableCollection<int>();
/// <summary>
/// 每个关键点的数据宽度 单位grid
/// </summary>
public int KeyPointWidth { get; set; }
/// <summary>
/// 选择中 public KeyPointsSelectMode KpSelectMode { get; set; } = KeyPointsSelectMode.Null;
/// </summary>
public bool IsSelecting => SelectObj != SELECT_OBJ.Null;
public SELECT_OBJ SelectObj { get; set; } = SELECT_OBJ.Null;
public enum SELECT_OBJ
{
Null,
Add,
Remove,
Move
}
#endregion #endregion
/// <summary> /// <summary>
......
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