#pragma once #include "resource.h" #include "HeaderCtrlExt.h" #include "CXLSListCtrl.h" #include "CCableRouting.h" typedef struct ListHead { int m_nEquFrCol; int m_nEquToCol; int m_nCableLenCol; int m_nCableSpec; int m_nPathUserDo; int m_nAssocNoorName; short m_nSheetIndex; int m_nPriSteps[17]; double m_dLenRever; TCHAR m_szXLSFile[256]; TCHAR m_szDwgFileName[65];//仅仅文件名 int m_nItemCount; TCHAR m_szHeadList[1024];//@隔开 }ListHead; typedef struct EListLine { EquHolder holder; TCHAR m_szItemLine[1024];//@隔开 }ELISTLINE; typedef struct SubItem { int nSubItem; TCHAR m_szSubItem[255]; }SUBITEM; typedef struct EListLine2 { EquHolder holder; int nItem; double dOD; }ELISTLINE2; class CDLFSDlg : public CDialog { DECLARE_DYNAMIC(CDLFSDlg) public: CDLFSDlg(CWnd* pParent = NULL); virtual ~CDLFSDlg(); enum { IDD = IDD_DLFS_DLG }; protected: virtual void DoDataExchange(CDataExchange *pDX); DECLARE_MESSAGE_MAP() public: virtual BOOL OnInitDialog(); virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); afx_msg LONG_PTR onAcadKeepFocus(UINT_PTR, LONG_PTR); afx_msg void OnBnClickedButton1(); afx_msg void OnBnClickedButton7(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnBnClickedButton9(); afx_msg void OnNMRClickList1(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnNMClickList1(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnBnClickedButton2(); afx_msg void OnBnClickedButton3(); afx_msg HBRUSH OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor); afx_msg void OnBnClickedButton5(); afx_msg void OnBnClickedButton6(); afx_msg void OnBnClickedButton10(); afx_msg void OnTimer(UINT_PTR nIDEvent); public: static void AppendLockPath(EquHolder *pHolder, LPCTSTR pszHd); static void AppendEquLockPath(LPCTSTR pszToEqu, LPCTSTR pszHd); protected: UINT EnableMenuItem(int nItem, UINT nID); bool SearchEqu(); bool SortCableSpec(); bool SearchSavedRoutPath(); void OnSelFrEqu(int nItem, int nSubItem); void OnSelToEqu(int nItem, int nSubItem); void OnSetEquNo(int nItem, int nSubItem, int nFrOrTo); void OnSelTermPoint(int nItem, int nSubItem); void OnPathPassBy(int nItem, int nSubItem); void OnPathPassByNo(int nItem, int nSubItem); void OnRoutingOn(int nItem, int nSubItem); void OnSetup(int nItem, int nSubItem); bool GetItemCableData(int nItem, CableData &data); bool CheckEquAssocList(); bool GetListHead(ListHead &head); bool GetEListLine(std::vector &rList); void ShowPath(bool bIsShow); void RemoveEquLockPath(LPCTSTR pszEqu); CString m_sXLSFile; short m_nSheetIndex; CString m_sSys; CButton m_wndBt1; CRect m_rcMain; CRect m_rcBt; CRect m_rcLst; int m_nEquFrCol; int m_nEquToCol; int m_nCableLenCol; int m_nCableSpec; int m_nPathUserDo; int m_nPathNosCol; int m_nODCol; int m_nSysCol; BOOL m_bHasSect; int m_nCableSectCol; bool m_bIgoreFillUsed; int m_nAssocNoorName; double m_dLenRever; double m_dPathOnPoint; double m_dBypassDis; double m_dEquFindDis; CUIntArray m_arPriSteps; CXLSListCtrl m_wndList; CImageList m_imageList; CFont m_NewHeaderFont; bool m_bIsVisible; UINT_PTR m_nIDEvent; CHeaderCtrlEx m_HeaderCtrl; //10,23 --- D10 CMapStringToString m_mapSubItem2Cell; //10,23 -- 1 or 0 CMap m_mapSubItem2Modified; public: afx_msg void OnDestroy(); };