//!获取句柄 private void GetDNFWindowPtr() { //!获取DNF句柄 m_vDNFPtr = Win32API.GetDNFWindowPtr(); //!移动游戏到原点 Win32API.MoveDNFWindow(m_vDNFPtr); if (IntPtr.Zero == m_vDNFPtr) { DNFScriptLog.LogError("获取DNF句柄失败..."); } else { DNFScriptLog.LogInfo("获取DNF句柄成功..."); } }
//!关闭 private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { //!清理资源 DNFScriptLog.Clean(); }