-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCementRT.cpp
More file actions
113 lines (96 loc) · 2.5 KB
/
CementRT.cpp
File metadata and controls
113 lines (96 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include "stdafx.h"
#include "resource.h"
#include "KRS.h"
#include "MainFrm.h"
#include "CementDoc.h"
#include "CementRT.h"
extern double TIME_current_time;
IMPLEMENT_DYNCREATE(CCementRT, CCementView)
CCementRT::CCementRT() : CCementView()
{
type_view = t_cement_rt;
m_flag_init = false;
}
CCementRT::~CCementRT()
{
}
void CCementRT::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CCementRT, CCementView)
ON_MESSAGE(PM_DATAACP, OnReadDataMessage)
ON_MESSAGE(PM_SYNCHRONIZE_GRAPH, OnSynchronizeGraph)
ON_MESSAGE(PM_EDITPOINT, OnLButtonDown1)
ON_WM_SETFOCUS()
ON_WM_TIMER()
ON_WM_CREATE()
END_MESSAGE_MAP()
LRESULT CCementRT::OnReadDataMessage(WPARAM wParam, LPARAM lParam)
{
if (m_parOfView == NULL) return false;
//------------------------------------------------
if(TIME_current_time == 0) return false;
//------------------------------------------------
ParamOfView *pList;
//-----------------------------------
//........................................................
if ((pList = m_parOfView->GetList(STAGES_GetExecutingStage()-1)) != NULL)
pList->UpdateInputData(1);
//---------------------------------------------
STAGES_EvaluateCalculations();
return true;
}
LRESULT CCementRT::OnSynchronizeGraph(WPARAM wParam, LPARAM lParam)
{
int num_work_stage = STAGES_GetExecutingStage() - 1;
if(pApp->IsActiveView(type_view) && m_parOfView->GetNumActiveList() == num_work_stage)
m_parOfView->GetList(num_work_stage)->SynchronizeGraph(int(wParam));
return true;
}
LRESULT CCementRT::OnLButtonDown1(WPARAM wParam, LPARAM lParam)
{
if(wParam == 150258)
{
flag_scroll = lParam;
SetParXScale(m_parOfView->GetNumActiveList());
}
return true;
}
void CCementRT::OnInitialUpdate()
{
if(m_flag_init) return;
m_flag_init = true;
m_ptmData = pgtmData;
m_pcurGlub = pgcurGlub;
CCementView::OnInitialUpdate();
KRS_CheckFinishInitialization();
}
void CCementRT::OnSetFocus(CWnd* pOldWnd)
{
CFormView::OnSetFocus(pOldWnd);
ASSERT(pFrm);
CheckRegim();
CheckGrf();
pFrm->ChangeTypeView((int)type_view, 2);
SetVisibilityPanelEtap();
}
void CCementRT::OnTimer(UINT_PTR nIDEvent)
{
if (nIDEvent == 1)
{
if (!KRS_running)
STAGES_InvalidateLists();
}
if (nIDEvent == 10 && gflgDataReaded != 0)
{
KillTimer(nIDEvent);
}
CCementView::OnTimer(nIDEvent);
}
int CCementRT::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CCementView::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}