Commit e6c3339e by 马宁-艾果

主页面算法重启和算法关闭

parent b8e82153
namespace VIZ.FGOUT.Domain.Message.Setting
{
public class RestartAlgorithmModel
{
}
}
namespace VIZ.FGOUT.Domain.Message.Setting
{
public class StopAlgorithmModel
{
}
}
......@@ -78,9 +78,11 @@
<Compile Include="Message\Setting\EndPlaceModel.cs" />
<Compile Include="Message\Setting\InvalidPlaceModel.cs" />
<Compile Include="Message\Setting\ReplayModel.cs" />
<Compile Include="Message\Setting\RestartAlgorithmModel.cs" />
<Compile Include="Message\Setting\SavePlaceModel.cs" />
<Compile Include="Message\Setting\SendPlaceModel.cs" />
<Compile Include="Message\Setting\StartPlaceModel.cs" />
<Compile Include="Message\Setting\StopAlgorithmModel.cs" />
<Compile Include="Message\Setting\UEControlModel.cs" />
<Compile Include="Message\Setting\UESettingModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmBorderScenceModel.cs" />
......
d6ab8bf0041b099ffa96af799ac732f2fa1bc8c1
94b031c27387c7e09c9e5e069835b4c5e228cb5d
......@@ -576,8 +576,8 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Restart()
{
MessageBoxEx.ShowDialog("开发中...");
return;
//MessageBoxEx.ShowDialog("开发中...");
//return;
MessageBoxExResult result = MessageBoxEx.ShowDialog("提示", "重启算法进程大概需要1分钟,是否继续?", MessageBoxExButtons.YES_CANCEL);
if (result == MessageBoxExResult.CANCEL)
return;
......@@ -585,16 +585,11 @@ namespace VIZ.FGOUT.Module
//// 清理视频控件
//ClearVideoControlContext clear_context = new ClearVideoControlContext(false, true);
//this.ClearVideoControl(clear_context);
//// 算法重启
//this.AlgorithmControllerDic[strategy.Type].RestartAlgorithm();
RestartAlgorithmModel restartAlgorithmModel = new RestartAlgorithmModel();
ApplicationDomain.MessageManager.Send(restartAlgorithmModel);
}
/// <summary>
/// 算法控制器集合
/// </summary>
private readonly Dictionary<AlgorithmStrategyType, IAlgorithmController> AlgorithmControllerDic = new Dictionary<AlgorithmStrategyType, IAlgorithmController>();
/// <summary>
/// 清理视频控件
/// </summary>
/// <param name="context">清理视频控件上下文</param>
......@@ -633,8 +628,8 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Stop()
{
MessageBoxEx.ShowDialog("开发中...");
return;
//MessageBoxEx.ShowDialog("开发中...");
//return;
MessageBoxExResult result = MessageBoxEx.ShowDialog("提示", "是否关闭算法?", MessageBoxExButtons.YES_CANCEL);
if (result == MessageBoxExResult.CANCEL)
return;
......@@ -642,15 +637,8 @@ namespace VIZ.FGOUT.Module
//// 清理视频控件
//ClearVideoControlContext clear_context = new ClearVideoControlContext(false, true);
//this.ClearVideoControl(clear_context);
//// 停止重启
//Task.Run(() =>
//{
// this.AlgorithmControllerDic[this.StrategyType].StopAlgorithm();
// this.ViewStatus = NDIViewStatus.Stop;
// this.WhenAlgorithmStop();
//});
StopAlgorithmModel stopAlgorithmModel = new StopAlgorithmModel();
ApplicationDomain.MessageManager.Send(stopAlgorithmModel);
}
#endregion
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Windows;
using VIZ.Framework.Common;
using VIZ.FGOUT.Common;
using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Storage;
using VIZ.Framework.Common;
namespace VIZ.FGOUT.Module
{
......
......@@ -136,15 +136,19 @@ namespace VIZ.FGOUT.Module
ApplicationDomainEx.MessageManager.Register<SendPlaceModel>(this, this.SendPlace);
// 保存按钮发送命令
ApplicationDomainEx.MessageManager.Register<SavePlaceModel>(this, this.SavePlace);
// 调用Replay发送命令
ApplicationDomainEx.MessageManager.Register<ReplayModel>(this,this.Replay);
//调用UESetting发送命令
ApplicationDomainEx.MessageManager.Register<UESettingModel>(this,this.UESetting);
//调用UEControl发送命令
ApplicationDomainEx.MessageManager.Register<UEControlModel>(this, this.UEControl);
//重启算法发送命令
ApplicationDomainEx.MessageManager.Register<RestartAlgorithmModel>(this, this.RestartAlgorithm);
//关闭算法发送命令
ApplicationDomainEx.MessageManager.Register<StopAlgorithmModel>(this, this.CloseAlgorithm);
}
private void UESetting(UESettingModel ueSettingModel)
......@@ -851,6 +855,22 @@ namespace VIZ.FGOUT.Module
}
/// <summary>
/// 关闭算法
/// </summary>
private void CloseAlgorithm(StopAlgorithmModel stopAlgorithmModel)
{
this.AlgorithmControllerDic[this.StrategyType].StopAlgorithm();
}
/// <summary>
/// 重启算法
/// </summary>
private void RestartAlgorithm(RestartAlgorithmModel restartAlgorithmModel)
{
this.AlgorithmControllerDic[this.StrategyType].RestartAlgorithm();
}
/// <summary>
/// 发送错误标记
/// </summary>
public void SendErrorTag()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}


C:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxEx.xaml;;
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxExWindow.xaml;;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Core
{
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using log4net;
using System;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Threading;
using log4net;
using TDx.SpaceMouse.Navigation3D;
namespace VIZ.Framework.Core
{
......
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace VIZ.Framework.Core
{
......
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