OpenKeyWord
Version: 426, Datum:
Hauptseite
Zusätzliche Informationen
Pakete
Klassen
Dateien
Auflistung der Dateien
Calculator.cs
1
#region Header
2
/*
3
==============================================================================
4
Author: Zoltan Hrabovszki <zh@openkeyword.de>
5
6
Copyright © 2012, 2013, 2014, 2015 Zoltán Hrabovszki, IT-Beratung Hrabovszki
7
www.OpenKeyWord.de
8
==============================================================================
9
10
This file is part of OpenKeyWord.
11
12
OpenKeyWord is free software: you can redistribute it and/or modify
13
it under the terms of the GNU General Public License as published by
14
the Free Software Foundation, either version 3 of the License, or
15
(at your option) any later version.
16
17
OpenKeyWord is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
GNU General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with OpenKeyWord. If not, see <http://www.gnu.org/licenses/>.
24
25
Diese Datei ist Teil von OpenKeyWord.
26
27
OpenKeyWord ist Freie Software: Sie können es unter den Bedingungen
28
der GNU General Public License, wie von der Free Software Foundation,
29
Version 3 der Lizenz oder (nach Ihrer Wahl) jeder späteren
30
veröffentlichten Version, weiterverbreiten und/oder modifizieren.
31
32
OpenKeyWord wird in der Hoffnung, dass es nützlich sein wird, aber
33
OHNE JEDE GEWÄHRLEISTUNG, bereitgestellt; sogar ohne die implizite
34
Gewährleistung der MARKTFÄHIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK.
35
Siehe die GNU General Public License für weitere Details.
36
37
Sie sollten eine Kopie der GNU General Public License zusammen mit
38
OpenKeyWord erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
39
*/
40
#endregion Header
41
42
namespace
OKW
.Frames
43
{
44
using
System
;
45
using
OKW
.
GUI
.
Selenium
;
46
47
[OKWGUI(
"Calculator"
)]
48
public
class
frmCalculator
:
SeBrowserChild
49
{
50
// http://de.selfhtml.org/javascript/beispiele/anzeige/taschenrechner.htm
51
#region Childobject of Frame
52
[OKWGUI(
"Display"
)]
53
public
SeTextField
Anzeige;
54
55
#region Zahlenblock
56
[OKWGUI(
"1"
)]
57
public
SePushButton
N1;
58
59
[OKWGUI(
"2"
)]
60
public
SePushButton
N2;
61
62
[OKWGUI(
"3"
)]
63
public
SePushButton
N3;
64
65
[OKWGUI(
"4"
)]
66
public
SePushButton
N4;
67
68
[OKWGUI(
"5"
)]
69
public
SePushButton
N5;
70
71
[OKWGUI(
"6"
)]
72
public
SePushButton
N6;
73
74
[OKWGUI(
"7"
)]
75
public
SePushButton
N7;
76
77
[OKWGUI(
"8"
)]
78
public
SePushButton
N8;
79
80
[OKWGUI(
"9"
)]
81
public
SePushButton
N9;
82
83
[OKWGUI(
"0"
)]
84
public
SePushButton
N0;
85
86
[OKWGUI(
"."
)]
87
public
SePushButton
Punkt;
88
#endregion
89
90
#region Grundrechenarten
91
[OKWGUI(
"+"
)]
92
public
SePushButton
Plus;
93
94
[OKWGUI(
"-"
)]
95
public
SePushButton
Minus;
96
97
[OKWGUI(
"/"
)]
98
public
SePushButton
Durch;
99
100
[OKWGUI(
"*"
)]
101
public
SePushButton
Mal;
102
103
104
[OKWGUI(
"="
)]
105
public
SePushButton
Gleich;
106
#endregion
107
108
#region Funktionen
109
[OKWGUI(
"C"
)]
110
public
SePushButton
Clear;
111
112
[OKWGUI(
"sqrt"
)]
113
public
SePushButton
Sqrt;
114
115
[OKWGUI(
"pow"
)]
116
public
SePushButton
Pow;
117
118
[OKWGUI(
"ln"
)]
119
public
SePushButton
Ln;
120
#endregion
121
#endregion
122
123
public
frmCalculator
()
124
: base(
"//title[text()='Taschenrechner']/../.."
)
125
{
126
Anzeige =
new
SeTextField
(
"//INPUT[@name='Display']"
);
127
128
//Zahlenblock
129
N1 =
new
SePushButton
(
"{0}//input[@value=' 1 ']"
, LOCATOR);
130
N2 =
new
SePushButton
(
"{0}//input[@value=' 2 ']"
, LOCATOR);
131
N3 =
new
SePushButton
(
"{0}//input[@value=' 3 ']"
, LOCATOR);
132
N4 =
new
SePushButton
(
"{0}//input[@value=' 4 ']"
, LOCATOR);
133
N5 =
new
SePushButton
(
"{0}//input[@value=' 5 ']"
, LOCATOR);
134
N6 =
new
SePushButton
(
"{0}//input[@value=' 6 ']"
, LOCATOR);
135
N7 =
new
SePushButton
(
"{0}//input[@value=' 7 ']"
, LOCATOR);
136
N8 =
new
SePushButton
(
"{0}//input[@value=' 8 ']"
, LOCATOR);
137
N9 =
new
SePushButton
(
"{0}//input[@value=' 9 ']"
, LOCATOR);
138
N0 =
new
SePushButton
(
"{0}//input[@value=' 0 ']"
, LOCATOR);
139
140
Punkt =
new
SePushButton
(
"{0}//INPUT[@type='button' and @value='*.*']"
, LOCATOR);
141
142
// Grundrechenarten
143
Plus =
new
SePushButton
(
"{0}//input[@type='button' and @value=' + ']"
, LOCATOR);
144
Minus =
new
SePushButton
(
"{0}//input[@type='button' and @value=' - ']"
, LOCATOR);
145
Durch =
new
SePushButton
(
"{0}//input[@type='button' and @value='*/*']"
, LOCATOR);
146
Mal =
new
SePushButton
(
"{0}//input[@type='button' and @value=' * ']"
, LOCATOR);
147
148
Gleich =
new
SePushButton
(
"{0}//input[@value=' = ']"
, LOCATOR);
149
150
// Funktionen
151
Clear =
new
SePushButton
(
"{0}//input[@type='reset' and @value=' C ']"
, LOCATOR);
152
153
// <input class="button" onclick="Sonderfunktion('sqrt')" type="button" value="sqrt "/>
154
Sqrt =
new
SePushButton
(
"{0}//input[class='button'] type='button' value='sqrt '"
, LOCATOR);
155
Pow =
new
SePushButton
(
"{0}"
, LOCATOR);
156
Ln =
new
SePushButton
(
"{0}"
, LOCATOR);
157
158
}
159
}
160
}
161
System
OKW.GUI
Definition:
AnyWinBase.cs:42
OKW.GUI.Selenium.SePushButton
Definition:
SePushButton.cs:61
OKW.GUI.Selenium
OKW.GUI.Selenium.SeBrowserChild
TODO: class SeBrowserChild dokumentieren...
Definition:
SeBrowserChild.cs:50
OKW
Definition:
Core.cs:40
OKW.Frames.frmCalculator
Definition:
Calculator.cs:48
OKW.GUI.Selenium.SeTextField
Diese Klasse implmenetiert die Methoden der IOKW_SimpleDataObj für ein DOM-Texfield ...
Definition:
SeTextField.cs:62
Calculator
Frames
Calculator.cs
Erzeugt am Son Aug 23 2015 10:33:09 für OpenKeyWord von
1.8.10