-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVIEW_CHART_FRAME.cpp
More file actions
104 lines (87 loc) · 1.88 KB
/
VIEW_CHART_FRAME.cpp
File metadata and controls
104 lines (87 loc) · 1.88 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
#include "VIEW_CHART_FRAME.h"
void VIEW_CHART_FRAME::Set_Frame()
{
}
void VIEW_CHART_FRAME::Frame_Display()
{
}
void VIEW_CHART_FRAME::Frame_Display(MAKING_CHART* making_chart)
{
system("cls");
Explan_Display();
console_ui.Class_Point_Display(making_chart);
Chart_Display(making_chart);
}
void VIEW_CHART_FRAME::Explan_Display()
{
int x = 38;
int y = 5;
console_ui.Set_Cursor_XY(x, y++);
cout << "나가기 : SPACE / ENTER / BACK을 눌러주세요.";
console_ui.Set_Cursor_XY(x, y++);
cout << "저장하기 : Y를 눌러주세요. ";
}
void VIEW_CHART_FRAME::Chart_Display(MAKING_CHART* making_chart)
{
while (1)
{
making_chart->Get_TimeTable(chart_table);
int y = 10;
console_ui.Set_Cursor_XY(MON_X, y++);
cout << "월\t\t화\t\t수\t\t목\t\t금";
for (int row = 1; row < MAX_ROWS_SIZE; row++)
{
for (int col = 0; col < MAX_COLS_SIZE; col++)
{
switch (col)
{
//월요일
case 2:
console_ui.Set_Cursor_XY(MON_X, y);
cout << chart_table[row][col];
break;
//월요일
case 3:
console_ui.Set_Cursor_XY(TUE_X, y);
cout << chart_table[row][col];
break;
//월요일
case 4:
console_ui.Set_Cursor_XY(WED_X, y);
cout << chart_table[row][col];
break;
//월요일
case 5:
console_ui.Set_Cursor_XY(THR_X, y);
cout << chart_table[row][col];
break;
//월요일
case 6:
console_ui.Set_Cursor_XY(FRI_X, y);
cout << chart_table[row][col];
break;
default:
console_ui.Set_Cursor_XY(MON_X-20, y);
cout << chart_table[row][col];
break;
}
}
y++;
}
int input_key = _getch();
switch (input_key)
{
case KEY_Y_L:
case KEY_Y_S:
making_chart->arr_to_csv(VIEW_CHART);
continue;
case SPACE:
case ENTER:
case BACK:
break;
default:
continue;
}
break;
}
}