Commit ddb6214b by liulongfei

Take状态标记

移除滚轮动画
parent 8e81f46b
......@@ -96,7 +96,8 @@ namespace VIZ.Package.Module
service.TryUpdateControlFieldListValue();
// 执行上版流程
this.Execute((obj, view, conn) =>
this.Execute(
action: (obj, view, conn) =>
{
this.vizCommandService.SetEnabledUpdate(conn, false);
try
......@@ -118,7 +119,9 @@ namespace VIZ.Package.Module
}
this.vizCommandService.SetEnabledUpdate(conn, true);
this.vizCommandService.Start(conn, ApplicationDomainEx.CurrentPage.Layer);
},
over: () =>
{
// 设置当前Take的模板
WPFHelper.BeginInvoke(() =>
{
......@@ -151,11 +154,13 @@ namespace VIZ.Package.Module
/// </summary>
private void Continue()
{
this.Execute((obj, view, conn) =>
this.Execute(
action: (obj, view, conn) =>
{
this.vizCommandService.TakeContinue(conn, ApplicationDomainEx.CurrentPage.Layer);
view?.TakeContinue(conn);
});
},
over: null);
}
#endregion
......@@ -172,10 +177,23 @@ namespace VIZ.Package.Module
/// </summary>
private void TakeOut()
{
this.Execute((obj, view, conn) =>
this.Execute(
action: (obj, view, conn) =>
{
this.vizCommandService.TakeOut(conn, ApplicationDomainEx.CurrentPage.Layer);
view?.TakeOut(conn);
},
over: () =>
{
// 清理Take状态
WPFHelper.BeginInvoke(() =>
{
if (ApplicationDomainEx.CurrentTake != null)
{
ApplicationDomainEx.CurrentTake.IsTake = false;
ApplicationDomainEx.CurrentTake = null;
}
});
});
}
......@@ -202,7 +220,8 @@ namespace VIZ.Package.Module
service.TryUpdateControlFieldListValue();
// 执行更新流程
this.Execute((obj, view, conn) =>
this.Execute(
action: (obj, view, conn) =>
{
this.vizCommandService.SetEnabledUpdate(conn, false);
try
......@@ -219,7 +238,8 @@ namespace VIZ.Package.Module
log.Error(ex);
}
this.vizCommandService.SetEnabledUpdate(conn, true);
});
},
over: null);
}
#endregion
......@@ -278,7 +298,8 @@ namespace VIZ.Package.Module
/// 执行
/// </summary>
/// <param name="action">行为</param>
private void Execute(Action<ControlObjectModel, IPluginView, ConnModel> action)
/// <param name="over">执行完成时处理</param>
private void Execute(Action<ControlObjectModel, IPluginView, ConnModel> action, Action over)
{
// 是否拥有打开的页或模板页
if (ApplicationDomainEx.CurrentPage == null)
......@@ -356,6 +377,15 @@ namespace VIZ.Package.Module
}
}
}
try
{
over?.Invoke();
}
catch (Exception ex)
{
log.Error(ex);
}
}
}
}
\ No newline at end of file
......@@ -123,7 +123,7 @@
</ContextMenu>
</dxg:GridControl.ContextMenu>
<dxg:GridControl.View>
<dxg:TableView x:Name="tabView" AllowEditing="True" ShowIndicator="False" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TableView x:Name="tabView" AllowEditing="True" ShowIndicator="False"
IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown" ShowVerticalLines="False"
ShowGroupPanel="False"
......
......@@ -38,7 +38,7 @@
<dxg:GridColumn Header="值" FieldName="Value" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TreeListView AllowEditing="False" ShowIndicator="False" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TreeListView AllowEditing="False" ShowIndicator="False"
IsColumnMenuEnabled="False"
NavigationStyle="Row" ShowVerticalLines="False"
ShowBandsPanel="False"
......
......@@ -37,7 +37,7 @@
TrueBrush="#FF0078D7"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleTakeConverter"
TrueBrush="#FF4E4BDE"
TrueBrush="#FF67ad5b"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
<!-- 列模板选择器 -->
......@@ -306,7 +306,7 @@
</dxg:GridControl.ContextMenu>
<dxg:GridControl.View>
<dxg:TableView IsColumnMenuEnabled="True" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding ElementName=uc, Path=DataContext.IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" ShowIndicator="False" RowMinHeight="69.5"
NavigationStyle="Cell" ShowVerticalLines="False"
......
......@@ -496,6 +496,13 @@ namespace VIZ.Package.Module
// 开始清理
List<ConnGroupModel> groups = ApplicationDomainEx.ConnGroups.ToList();
this.pageModelController.BeginTakeClear(groups);
// 清理Take状态
if (ApplicationDomainEx.CurrentTake != null)
{
ApplicationDomainEx.CurrentTake.IsTake = false;
ApplicationDomainEx.CurrentTake = null;
}
}
#endregion
......
......@@ -29,7 +29,10 @@
<fcore:Bitmap2ImageSourceConverter x:Key="Bitmap2ImageSourceConverter"></fcore:Bitmap2ImageSourceConverter>
<fcore:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:PageType}"></fcore:Enum2EnumDescriptionConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter"
TrueBrush="#FF0078D7"
TrueBrush="#FF67ad5b"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleTakeConverter"
TrueBrush="#FF4E4BDE"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
</ResourceDictionary>
</UserControl.Resources>
......@@ -83,7 +86,7 @@
<dxg:GridColumn Header="引擎类型" FieldName="EngineType" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False"></dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView IsColumnMenuEnabled="False" RowMinHeight="69.5" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TableView IsColumnMenuEnabled="False" RowMinHeight="69.5"
AllowEditing="True" ShowIndicator="False"
NavigationStyle="Cell" ShowVerticalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown"
......
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