Commit 065417ec by liulongfei

1

parent 9fdb5301
......@@ -89,6 +89,7 @@
<Compile Include="Message\ControlObject\ControlListFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlFieldChangedMessage.cs" />
<Compile Include="Message\Hotkey\HotkeyMessage.cs" />
<Compile Include="Message\Log\AlertMessage.cs" />
<Compile Include="Message\Log\ErrorLogMessage.cs" />
<Compile Include="Message\Log\VizCommandLogMessage.cs" />
<Compile Include="Message\Page\PageDeleteMessage.cs" />
......
......@@ -81,7 +81,8 @@ namespace VIZ.Package.Module
if (obj != null)
{
this.vizCommandControlObjectService.SetControlObjectOtherWithTransitionLogic(conn, obj, ApplicationDomainEx.CurrentPage);
this.vizCommandControlObjectService.SetCustomControlObjectWithTransitionLogic(conn, obj, ApplicationDomainEx.CurrentPage);
// 切换逻辑场景不支持自定义字段
// this.vizCommandControlObjectService.SetCustomControlObjectWithTransitionLogic(conn, obj, ApplicationDomainEx.CurrentPage);
}
if (view != null)
{
......@@ -199,7 +200,8 @@ namespace VIZ.Package.Module
if (obj != null)
{
this.vizCommandControlObjectService.SetControlObjectCurrentWithTransitionLogic(conn, obj, ApplicationDomainEx.CurrentPage);
this.vizCommandControlObjectService.SetCustomControlObjectWithTransitionLogic(conn, obj, ApplicationDomainEx.CurrentPage);
// 切换逻辑场景不支持自定义字段
// this.vizCommandControlObjectService.SetCustomControlObjectWithTransitionLogic(conn, obj, ApplicationDomainEx.CurrentPage);
}
if (view != null)
{
......
......@@ -13,6 +13,24 @@ namespace VIZ.Package.Module
/// </summary>
public interface IControlService : IService
{
/// <summary>
/// 上板
/// </summary>
void Take();
/// <summary>
/// 继续
/// </summary>
void Continue();
/// <summary>
/// 下版
/// </summary>
void TakeOut();
/// <summary>
/// 更新
/// </summary>
void Update();
}
}
......@@ -96,7 +96,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 上板
/// </summary>
private void Take()
public void Take()
{
// 更新控制字段List的值
IFieldTreeService service = ApplicationDomainEx.ServiceManager.GetService<IFieldTreeService>(ViewServiceKeys.FIELD_TREE_SERVICE);
......@@ -154,7 +154,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 继续
/// </summary>
private void Continue()
public void Continue()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_CONTINUE);
......@@ -186,7 +186,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 下版
/// </summary>
private void TakeOut()
public void TakeOut()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
......@@ -229,7 +229,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 更新
/// </summary>
private void Update()
public void Update()
{
// 更新控制字段List的值
IFieldTreeService service = ApplicationDomainEx.ServiceManager.GetService<IFieldTreeService>(ViewServiceKeys.FIELD_TREE_SERVICE);
......
......@@ -149,7 +149,6 @@ namespace VIZ.Package.Module
// 当前没有打开的页或模板 || 当前没有打开的项目
if (ApplicationDomainEx.CurrentPage == null || ApplicationDomainEx.ProjectDbContext == null)
{
DXMessageBox.Show("保存失败!");
return;
}
......@@ -174,8 +173,14 @@ namespace VIZ.Package.Module
// 更新列表值
service.TryUpdateControlFieldListValue();
// 保存
this.controlObjectService.SaveControlFields(ApplicationDomainEx.CurrentPage, obj.AllFiledNodes);
// 发送弹出提示
AlertMessage alertMessage = new AlertMessage();
alertMessage.Message = "保存成功";
ApplicationDomainEx.MessageManager.Send(alertMessage);
}
#endregion
......@@ -195,7 +200,6 @@ namespace VIZ.Package.Module
// 当前没有打开的页或模板 || 当前没有打开的项目
if (ApplicationDomainEx.CurrentPage == null || ApplicationDomainEx.ProjectDbContext == null)
{
DXMessageBox.Show("另存失败!");
return;
}
......@@ -246,6 +250,11 @@ namespace VIZ.Package.Module
string remark = $"页:{page.ScenePath}";
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_CONTROL_FIELD_SAVE_AS, remark);
}
// 发送弹出提示
AlertMessage alertMessage = new AlertMessage();
alertMessage.Message = "另存成功";
ApplicationDomainEx.MessageManager.Send(alertMessage);
}
#endregion
......@@ -324,7 +333,9 @@ namespace VIZ.Package.Module
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
// 保存
this.Save();
return;
}
}
......
......@@ -32,6 +32,11 @@
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="240"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 连接分组 -->
<ListBox Style="{StaticResource ListBox_None}" Margin="10,0,0,0"
ItemsSource="{Binding Path=ItemsSrouce}"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
......@@ -118,6 +123,10 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!-- AlertMessage -->
<TextBlock Text="{Binding Path=AlertMessage}" VerticalAlignment="Center" Grid.Column="1" TextAlignment="Right" TextTrimming="CharacterEllipsis"
ToolTip="{Binding Path=AlertMessage}" Margin="0,0,15,0" Foreground="#FF92FF3D"></TextBlock>
</Grid>
</UserControl>
......@@ -10,7 +10,7 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="300"></ColumnDefinition>
<ColumnDefinition Width="240"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<!-- 項目名 -->
......
......@@ -47,6 +47,7 @@ namespace VIZ.Package.Module
{
ApplicationDomainEx.MessageManager.Register<ConnChangedMessage>(this, this.OnConnChangedMessage);
ApplicationDomainEx.MessageManager.Register<VizPreviewReadyMessage>(this, this.OnVizPreviewReadyMessage);
ApplicationDomainEx.MessageManager.Register<AlertMessage>(this, this.OnAlertMessage);
}
// ==========================================================================
......@@ -81,6 +82,20 @@ namespace VIZ.Package.Module
#endregion
#region AlertMessage -- 弹出提示消息
private string alertMessage;
/// <summary>
/// 弹出提示消息
/// </summary>
public string AlertMessage
{
get { return alertMessage; }
set { alertMessage = value; this.RaisePropertyChanged(nameof(AlertMessage)); }
}
#endregion
// ==========================================================================
// Command
// ==========================================================================
......@@ -153,6 +168,22 @@ namespace VIZ.Package.Module
}
/// <summary>
/// 弹出消息
/// </summary>
/// <param name="msg">消息</param>
private void OnAlertMessage(AlertMessage msg)
{
this.AlertMessage = msg.Message;
ApplicationDomainEx.DelayManager.Wait("MainStatusViewModel.OnAlertMessage", 3, () =>
{
WPFHelper.BeginInvoke(() =>
{
this.AlertMessage = null;
});
});
}
/// <summary>
/// 初始化 & 连接
/// </summary>
private void InitAndConnnectGroups()
......
......@@ -322,6 +322,11 @@ namespace VIZ.Package.Module
ProjectSaveMessage msg = new ProjectSaveMessage();
ApplicationDomainEx.MessageManager.Send(msg);
// 发送弹出提示
AlertMessage alertMessage = new AlertMessage();
alertMessage.Message = "保存成功";
ApplicationDomainEx.MessageManager.Send(alertMessage);
}
#endregion
......
......@@ -22,7 +22,7 @@
<fcore:Bool2ControlTemplateConverter x:Key="Bool2ControlTemplateConverter_Layer">
<fcore:Bool2ControlTemplateConverter.TrueResult>
<ControlTemplate>
<dxe:TextEdit EditValue="{Binding Path=LayerIdentifier}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="2,0,2,0" IsReadOnly="True">
<dxe:TextEdit EditValue="{Binding Path=LayerIdentifier}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="2,0,2,0" IsReadOnly="True" Background="Transparent">
<dxe:TextEdit.ToolTip>
<Grid Height="75" MinWidth="220">
<Grid.RowDefinitions>
......@@ -70,7 +70,7 @@
</Grid.RowDefinitions>
<!-- 场景 -->
<TextBlock Text="场景:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" IsReadOnly="True"
<dxe:TextEdit Grid.Column="1" Height="30" IsReadOnly="True" Background="Transparent"
EditValue="{Binding Path=Scene}"></dxe:TextEdit>
<!-- 备注 -->
......
......@@ -960,6 +960,26 @@ namespace VIZ.Package.Module
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
this.OpenNextPageItem();
return;
}
// Take当前页打开下一页
if (string.Equals(msg.Key, ApplicationDomainEx.HotKeyConfig.TakeAndOpenNextPage))
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
if (!(ApplicationDomainEx.CurrentPage is PageModel))
return;
// Take当前页
IControlService service = ApplicationDomainEx.ServiceManager.GetService<IControlService>(ViewServiceKeys.CONTROL_SERVICE);
service.Take();
// 打开下一页
this.OpenNextPageItem();
return;
}
}
......
......@@ -49,6 +49,7 @@
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions>
<!-- Take -->
<TextBlock Text="Take:" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
......@@ -70,6 +71,10 @@
<TextBlock Text="打开下一页:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="4"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Height="30" Grid.Row="4" Margin="15,0,10,0"
Hotkey="{Binding Path=OpenNextPage,Mode=TwoWay}"></fcommon:HotkeyBox>
<!-- Take当前页打开下一个页 -->
<TextBlock Text="Take当前页打开下一页:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="5"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Height="30" Grid.Row="5" Margin="15,0,10,0"
Hotkey="{Binding Path=TakeAndOpenNextPage,Mode=TwoWay}"></fcommon:HotkeyBox>
</Grid>
</GroupBox>
<GroupBox Header="其他快捷键" Margin="10,5,10,10" Padding="5" Grid.Row="1">
......
......@@ -139,6 +139,20 @@ namespace VIZ.Package.Module
#endregion
#region TakeAndOpenNextPage -- Take当前页打开下一页
private string takeAndOpenNextPage;
/// <summary>
/// Take当前页打开下一页
/// </summary>
public string TakeAndOpenNextPage
{
get { return takeAndOpenNextPage; }
set { takeAndOpenNextPage = value; this.RaisePropertyChanged(nameof(TakeAndOpenNextPage)); }
}
#endregion
#region SaveOpendPageOrTemplateAndProject -- 保存当前打开的页或模板和项目
private string saveOpendPageOrTemplateAndProject;
......@@ -181,6 +195,7 @@ namespace VIZ.Package.Module
this.TakeOut = config.TakeOut;
this.TakeUpdate = config.TakeUpdate;
this.OpenNextPage = config.OpenNextPage;
this.TakeAndOpenNextPage = config.TakeAndOpenNextPage;
this.SaveOpendPageOrTemplateAndProject = config.SaveOpendPageOrTemplateAndProject;
}
......@@ -202,6 +217,7 @@ namespace VIZ.Package.Module
config.TakeOut = this.TakeOut;
config.TakeUpdate = this.TakeUpdate;
config.OpenNextPage = this.OpenNextPage;
config.TakeAndOpenNextPage = this.TakeAndOpenNextPage;
config.SaveOpendPageOrTemplateAndProject = this.SaveOpendPageOrTemplateAndProject;
ApplicationDomainEx.LocalDbContext.HotKeyConfig.Update(config);
......@@ -242,6 +258,10 @@ namespace VIZ.Package.Module
{
this.OpenNextPage = string.Empty;
}
if (string.Equals(this.TakeAndOpenNextPage, key))
{
this.TakeAndOpenNextPage = string.Empty;
}
if (string.Equals(this.SaveOpendPageOrTemplateAndProject, key))
{
this.SaveOpendPageOrTemplateAndProject = string.Empty;
......
......@@ -13,6 +13,12 @@ namespace VIZ.Package.Storage
public class HotKeyConfigEntity
{
/// <summary>
/// 编号
/// </summary>
[BsonId(true)]
public int Id { get; set; }
/// <summary>
/// 拷贝
/// </summary>
public const string COPY = "Ctrl + C";
......@@ -33,12 +39,6 @@ namespace VIZ.Package.Storage
public const string DELETE = "Delete";
/// <summary>
/// 编号
/// </summary>
[BsonId(true)]
public int Id { get; set; }
/// <summary>
/// 上版
/// </summary>
public string Take { get; set; } = "F5";
......@@ -64,6 +64,11 @@ namespace VIZ.Package.Storage
public string OpenNextPage { get; set; } = "F9";
/// <summary>
/// Take当前页 & 打开下一页
/// </summary>
public string TakeAndOpenNextPage { get; set; } = "F10";
/// <summary>
/// 保存当前打开的页或模板和项目
/// </summary>
public string SaveOpendPageOrTemplateAndProject { get; set; } = "Ctrl + S";
......
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