public Editor_Form() { InitializeComponent(); EditorGraph.init(); DomainManager.Instance().setBaseForm(this); m_domain_mng = DomainManager.Instance(); EditorGraph.registerComponent(null, m_domain_mng); mComponent = new MainFormComponent(this); EditorGraph.registerComponent(null, mComponent); m_log = new EditorLog(); EditorGraph.registerComponent(null, m_log); this.AddOwnedForm(m_log.LogForm); }
public static DomainManager Instance() { if (s_domainmng == null) { s_domainmng = new DomainManager(); return s_domainmng; } else { if (s_domainmng.m_base_form == null) { throw new System.Exception("初始化DomainManager未赋予Editor_Form"); } return s_domainmng; } }