⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cvenus.h

📁 这是本人两年前兼职为某个公司做的石油钻进设计软件
💻 H
字号:
// CVenus.h : main header file for the CVENUS application
//

#if !defined(AFX_CVENUS_H__C8B36AC5_B9BC_11D6_BBB3_5254AB281610__INCLUDED_)
#define AFX_CVENUS_H__C8B36AC5_B9BC_11D6_BBB3_5254AB281610__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

template<class _Ty> inline
	void swap(_Ty& _X, _Ty& _Y)
	{_Ty _Tmp = _X;
	_X = _Y, _Y = _Tmp; }

/////////////////////////////////////////////////////////////////////////////
// CCVenusApp:
// See CVenus.cpp for the implementation of this class
//
#include "Venus_structure.h"
#include "MainDlg.h"
#include "ResultDlg.h"
#include "CGraphDlg.h"
#include "GPCommandLineInfo.h"

#include <math.h>

//#define	CanEndCompute

#ifdef	CanEndCompute
#define	ENDCOMPUTE	if(bFinishThread) AfxEndThread(1)
#else
#define ENDCOMPUTE	
#endif

class CCVenusApp : public CWinApp,
                         public CBCGWorkspace
{
public:
	CCVenusApp();

	~CCVenusApp();

	int				m_iAppType;		//	标识当前应用程序的类型
	/*		1:	venus
			2:	spd
			3:	shwrj
			4:  taoguan
	*/

	CMainDlg      *m_pMainDlg;     // 主对话框指针
	CResultDlg	  *m_pResultDlg;
	CCGraphDlg    *m_pGraphDlg;    // 绘制图形对话框指针

	bool		  m_bResultDisplayed;
	bool		  m_bGraphDisplayed;

	CRect         m_rcTipDlg;      // 绘制图形提示对话框

	BYTE          m_btMain;        // 区分主显示窗口、图形窗口
	BYTE          m_btProjectType; // 工程类型

	sGraphData    *m_pGraphData;   // 图形数据
	int           m_iGraphNum;     // 图形个数
	int           m_iGraphLoc;     // 图形位置

	CString       m_cBaseFilePath; // 基础文件路径
	CString		  m_cBaseFileLeft;
	CString		  m_cBaseFileName;	// 基础文件名
	CString       m_cCalcFilePath; // 计算结果文件路径
	CString       m_cGraFilePath;  // 图形文件路径

	BOOL          m_bModifyData;   // 是否修改基础数据
//	BYTE          m_btSaveType;    // 保存类型
	CString       m_strDataPath;   // 数据路径
	CString       m_strAppPath;    // 应用程序路径

static	bool		m_bIsShowSplash;	// 确定是否已经显示Splash
public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	BOOL ProcessShellCommand( CGPCommandLineInfo& rCmdInfo );
	bool IsAllSaved();
	bool IsHaveGraph();
	void GetLocalPath(CString *strFilePath);
	bool		IsSaveBaseData();
	void		GraphCtrl();
	void		GetGraphDataStr(CString dest, CString &str1, CString &str2);  // 取得图形数据字符串
	sAnalyzeStr*	AnalyzeGraphStr(CString GraphStr, int iRow, BOOL bLineEnd = FALSE); // 分析一行图形数据字符串
//	void		SetGraphPos();                                                // 设置图形对话框的位置 
	BOOL		ReadGraphData(CStringList* pGraphData, BOOL bCur = FALSE);    // 读图形数据
	BOOL		ReadInputData(sInputDataParm* pInputParm, CString* pFileStr);
	CString		GetMyAppPath();
//	void		IsSaveData();
//	void		SaveData();
	BOOL		SaveBaseData();
	void		GetExtName(int type, CString *pStr);
	CString		GetOpenFileName(int type, BOOL bOpen = TRUE);              // 取得被打开的数据文件名
	void		GetReadFileParm(sInputDataParm* pInputParm);                  // 取得被读基础数据文件的参数
//	void		SetMainPos();                                                 // 设置主对话框的位置 


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCVenusApp)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CCVenusApp)
	afx_msg void OnAppAbout();
	afx_msg void OnAnalyseCalc1();
	afx_msg void OnDisCurRst();
	afx_msg void OnDispCalcRst();
	afx_msg void OnDisCurGraph();
	afx_msg void OnDispGraph1();
	afx_msg void OnDispGraph2();
	afx_msg void OnBitmap();
	afx_msg void OnDispGraph3();
	afx_msg void OnDispGraph4();
	afx_msg void OnDispGraph5();
	afx_msg void OnDispGraph6();
	afx_msg void OnHelp();
	afx_msg void OnHelp1();
	afx_msg void OnBaseNew();
	afx_msg void OnBaseOpen();
	afx_msg void OnBaseSave();
	afx_msg void OnUpdateBaseSave(CCmdUI* pCmdUI);
	afx_msg void OnBaseSaveas();
	afx_msg void OnBasePrint();
	afx_msg void OnBasePrintpreview();
	afx_msg void OnBaseDisplay();
	afx_msg void OnDisplay1();
	afx_msg void OnResultPrintpreview();
	afx_msg void OnDisplay4();
	afx_msg void OnGraphSave();
	afx_msg void OnResultDislplay();
	afx_msg void OnUpdateResultDislplay(CCmdUI* pCmdUI);
	afx_msg void OnGraphDisplay();
	afx_msg void OnUpdateGraphDisplay(CCmdUI* pCmdUI);
	afx_msg void OnSpdVenus();
	afx_msg void OnSpdShwrj();
	afx_msg void OnShwrjVenus();
	afx_msg void OnShwrjSpd();
	afx_msg void OnVemusSpd();
	afx_msg void OnVenusShwrj();
	afx_msg void OnVenusSyn();
	afx_msg void OnSpdTg();
	afx_msg void OnShwrjTg();
	afx_msg void OnVenusTg();
	afx_msg void OnTgVenus();
	afx_msg void OnTgSpd();
	afx_msg void OnTgShwrj();
	afx_msg void OnVenusAllpreview();
	afx_msg void OnUpdateVenusAllpreview(CCmdUI* pCmdUI);
	afx_msg void OnVenusAllprint();
	afx_msg void OnUpdateVenusAllprint(CCmdUI* pCmdUI);
	afx_msg void OnUpdateVenusSyn(CCmdUI* pCmdUI);
	afx_msg void OnHelpShw();
	afx_msg void OnUpdateGraph(CCmdUI* pCmdUI);
	//}}AFX_MSG
	afx_msg void OnProject(UINT nID);
	afx_msg void OnUpdateProject(CCmdUI *pCmdUI);

	DECLARE_MESSAGE_MAP()
protected:
	void ExitTG();
	bool InitTG();
	void ExitShwrj();
	bool InitShwrj();
	void ExitSpd();
	bool InitSpd();
	void BaseFileChanged();
	void ClearGraphData();
	void DisplayGraph(CStringList* pGraphData);
	void ExitVenus();
	bool InitVenus();
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CVENUS_H__C8B36AC5_B9BC_11D6_BBB3_5254AB281610__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -