-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
110 lines (106 loc) · 4.43 KB
/
Copy pathmain.cpp
File metadata and controls
110 lines (106 loc) · 4.43 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
/*
#################################################################################
#################################################################################
## Konkord
## Version 0.0.2009.04.19
## This program was created for learning words
## from different languages.
##
## Copyright(C) 2009 Sławomir Domagała
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>
##
## E-mail: E-mail: g_o_d_l_a_r_k / monkey / g_m_a_i_l / dot / c_o_m
#################################################################################
#################################################################################
*/
#define _GLIBCXX_DEBUG_PEDANTIC 1
#include "nakladka.h"
#include "engine.h"
using namespace std;
typedef unsigned short int ushort;
extern string* Error::DescriptionOfErrors;
int main() {
Error::setDescriptionOfErrors();
ServiceOfTasks *serviceOfTasks = new ServiceOfTasks;
serviceOfTasks->askWord = &(Interface::askWord);
serviceOfTasks->printWords = &Interface::printWords;
serviceOfTasks->dialogWindow = &Interface::dialogWindow;
serviceOfTasks->Yes_No_Cancel = &Interface::Yes_No_Cancel;
serviceOfTasks->printMessage = &Interface::printMessage;
serviceOfTasks->infoWindow = &Interface::infoWindow;
serviceOfTasks->optionWindow = &Interface::optionWindow;
serviceOfTasks->radioWindow = &Interface::radioWindow;
ushort numberOptionsM1 = 14;
short int *numberOfActionsM1 = new short int[numberOptionsM1];
numberOfActionsM1[0] = 1;
numberOfActionsM1[1] = 2;
numberOfActionsM1[2] = 4;
numberOfActionsM1[3] = 5;
numberOfActionsM1[4] = 6;
numberOfActionsM1[5] = 7;
numberOfActionsM1[6] = 8;
numberOfActionsM1[7] = 9;
numberOfActionsM1[8] = 12;
numberOfActionsM1[9] = 13;
numberOfActionsM1[10] = 16;
numberOfActionsM1[11] = 18;
numberOfActionsM1[12] = 19;
numberOfActionsM1[13] = 0;
string *describesOptionsM1 = new string[numberOptionsM1];
describesOptionsM1[0] = "Powtórz poznane słowa";
describesOptionsM1[1] = "Naucz się nowych";
describesOptionsM1[2] = "Edytuje słowo";
describesOptionsM1[3] = "Usuń słowo";
describesOptionsM1[4] = "Połącz słowa";
describesOptionsM1[5] = "Rozłącz słowa";
describesOptionsM1[6] = "Dodaj słowo";
describesOptionsM1[7] = "Dodaj słowa";
describesOptionsM1[8] = "Wyświetl informacje na temat kursu";
describesOptionsM1[9] = "Wyświetl słowa";
describesOptionsM1[10] = "Ustawienia kursu";
describesOptionsM1[11] = "Wczytaj słowa z pliku";
describesOptionsM1[12] = "Znajdź słowa";
describesOptionsM1[13] = "Zamknij podmenu";
Menu *menu1 = new Menu(numberOptionsM1, numberOfActionsM1, describesOptionsM1, NULL, 0, serviceOfTasks, false);
ushort numberOptionsM2 = 8;
short int *numberOfActionsM2 = new short int[numberOptionsM2];
numberOfActionsM2[0] = 3;
numberOfActionsM2[1] = 10;
numberOfActionsM2[2] = 11;
numberOfActionsM2[3] = 14;
numberOfActionsM2[4] = 15;
numberOfActionsM2[5] = 17;
numberOfActionsM2[6] = -1;
numberOfActionsM2[7] = 0;
string *describesOptionsM2 = new string[numberOptionsM2];
describesOptionsM2[0] = "Zamknij kurs";
describesOptionsM2[1] = "Nowy kurs";
describesOptionsM2[2] = "Otwórz kurs";
describesOptionsM2[3] = "Zapisz kurs";
describesOptionsM2[4] = "Zapisz jako...";
describesOptionsM2[5] = "Przełącz kurs";
describesOptionsM2[6] = "Podmenu Kurs->";
describesOptionsM2[7] = "Zamknij program";
Menu *menu2 = new Menu(numberOptionsM2, numberOfActionsM2, describesOptionsM2, menu1, 1, serviceOfTasks, true);
menu2->open();
delete menu2;
delete [] numberOfActionsM2;
delete [] describesOptionsM2;
delete menu1;
delete [] numberOfActionsM1;
delete [] describesOptionsM1;
delete serviceOfTasks;
Error::eraseDerscriptionOfErros();
}