using SuperMap.UI; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WWPipeLine.MapBasic { /// <summary> /// 为统一管理地图操作状态设置的基类 /// </summary> public abstract class MapOperInterface { protected Form m_FormMain; protected MapControl m_MapControl; public static Dictionary<string, MapOperInterface> AllMapOperInterface = new Dictionary<string, MapOperInterface>(); public static void Remove(Type t) { if (AllMapOperInterface.ContainsKey(t.FullName)) { AllMapOperInterface.Remove(t.FullName); } } protected bool m_UnRegistered; public virtual bool UnRegistered { get => m_UnRegistered; set => m_UnRegistered = value; } public MapOperInterface(MapControl mapControl, Form formMain) { AllMapOperInterface.Add(this.GetType().FullName, this); m_MapControl = mapControl; m_FormMain = formMain; } /// <summary> /// 取消注册。备注:virtual void UnRegister /// </summary> public virtual void UnRegister() { } } }