public BaseForm(string filename, MainForm parent) { InitializeComponent(); InitVars(); m_parent = parent; m_doc = new BaseDoc(this, filename); m_view = new BaseView(this, this.PANEL.Handle); this.PANEL.m_baseForm = this; m_doc.DocLogical.SetMainViewHwnd((int)this.PANEL.Handle); this.MouseWheel += new MouseEventHandler(this.BaseForm_MouseWheel); this.PanelView.GotFocus += new EventHandler(this.PanelView_GotFocus); this.PanelView.LostFocus += new EventHandler(this.PanelView_LostFocus); this.PanelView.MouseDown += new MouseEventHandler(this.PanelView_MouseDown); this.PanelView.Resize += new EventHandler(this.PanelView_Resize); this.KeyPreview = true; // 顶视图 InitTopView_Tga(filename); InitTopView_Old(); // lua脚本 InitLua(); // ahpho suntao // 初始化路径面板 InitPatrol(); // 初始化交通面板 InitTraffic(); // InitPolyComponents(); InitPoly(); // 初始化sql连接 InitSqlConnection(); // 初始化Npc面板 InitNpc(); EngineLayer.ATLBase.OnResizeNpcWindow(); // 初始化Doodad面板 InitDoodad(); EngineLayer.ATLBase.OnResizeDoodadWindow(); // 初始化预览面板 InitPreviewCanvas(); // end ahpho // loadtree DateTime t_begin = DateTime.Now; LogicHelper.LoadTree(m_doc.m_AllLogicObj, this.treeView1, m_bShowAllNpcDoodad); TimeSpan t_delta = DateTime.Now - t_begin; Debug.WriteLine(t_delta.ToString()); //MessageBox.Show(t_delta.ToString()); // init timer InitRenderTimer(); // 读取路径和阵型信息 DataColumn orderIDColumn = new DataColumn("ID"); DataColumn orderNameColumn = new DataColumn("Name"); DataColumn orderCountColumn = new DataColumn("Count"); npcOrderTable.Columns.Clear(); npcOrderTable.Columns.Add(orderIDColumn); npcOrderTable.Columns.Add(orderNameColumn); npcOrderTable.Columns.Add(orderCountColumn); InitNpcOrderTable(); DataColumn patrolPathIDColumn = new DataColumn("ID"); DataColumn patrolPathNameColumn = new DataColumn("Name"); patrolPathTable.Columns.Clear(); patrolPathTable.Columns.Add(patrolPathIDColumn); patrolPathTable.Columns.Add(patrolPathNameColumn); InitPatrolPathTable(); InitCameraUI(); m_CheckRelive = new CheckRelive(); m_CheckRelive.Init(filename, m_doc.DocLogical, SceneSceneEditor); }