| | |
| | | /// </summary> |
| | | public class MapViewProjectListCallBackObj : CallBackObj, IMapViewProjectListEvents |
| | | { |
| | | /// <summary> |
| | | /// 选择项目事件 |
| | | /// </summary> |
| | | public event Func<string, bool> SelectProjectEvent; |
| | | public event Action<string> JumpSimulationEvent; |
| | | |
| | | /// <summary> |
| | | /// 取消选择项目事件 |
| | | /// </summary> |
| | | public event Func<bool> CancelSelectProjectEvent; |
| | | |
| | | /// <summary> |
| | | /// 选择项目 |
| | | /// </summary> |
| | | public bool SelectProject(string projectId) |
| | | public void JumpSimulation(string msg) |
| | | { |
| | | if (string.IsNullOrEmpty(projectId)) |
| | | if (JumpSimulationEvent != null) |
| | | { |
| | | return false; |
| | | this.JumpSimulationEvent?.Invoke(msg); |
| | | } |
| | | if (this.SelectProjectEvent == null) |
| | | { |
| | | return true; |
| | | } |
| | | return this.SelectProjectEvent.Invoke(projectId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取消选择项目 |
| | | /// </summary> |
| | | public bool CancelSelectProject() |
| | | { |
| | | if (this.CancelSelectProjectEvent == null) |
| | | { |
| | | return true; |
| | | } |
| | | return this.CancelSelectProjectEvent.Invoke(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |