Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Z
Zahlenvergleich_GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frank
Zahlenvergleich_GUI
Commits
b0f24eb1
Commit
b0f24eb1
authored
9 years ago
by
Frank
Browse files
Options
Downloads
Patches
Plain Diff
Quellcode
parents
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Form1.cs
+60
-0
60 additions, 0 deletions
Form1.cs
with
60 additions
and
0 deletions
Form1.cs
0 → 100644
+
60
−
0
View file @
b0f24eb1
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
Zahlenvergleich
{
public
partial
class
Zahlenvergleich
:
Form
{
public
Zahlenvergleich
()
{
InitializeComponent
();
ToolTip
tp
=
new
ToolTip
();
tp
.
SetToolTip
(
cmd_clear
,
"Eingabe und Anzeigefelder löschen"
);
tp
.
SetToolTip
(
cmd_end
,
"Programm beenden"
);
tp
.
SetToolTip
(
cmd_show
,
"Zahlen vergleichen"
);
tp
.
SetToolTip
(
txt_zahl1
,
"Zahl 1"
);
tp
.
SetToolTip
(
txt_zahl2
,
"Zahl 2"
);
}
private
void
cmd_end_Click
(
object
sender
,
EventArgs
e
)
{
Application
.
Exit
();
}
private
void
cmd_clear_Click
(
object
sender
,
EventArgs
e
)
{
txt_zahl1
.
Text
=
txt_zahl2
.
Text
=
lbl_output
.
Text
=
null
;
txt_zahl1
.
Focus
();
}
private
void
cmd_show_Click
(
object
sender
,
EventArgs
e
)
{
// Variablen
double
zahl1
,
zahl2
;
try
{
zahl1
=
Convert
.
ToDouble
(
txt_zahl1
.
Text
);
zahl2
=
Convert
.
ToDouble
(
txt_zahl2
.
Text
);
if
(
zahl1
<
zahl2
)
lbl_output
.
Text
=
"Zahl 1 ist kleiner Zahl 2."
;
else
if
(
zahl1
<
zahl2
)
lbl_output
.
Text
=
"Zahl 1 ist größer Zahl 2."
;
else
lbl_output
.
Text
=
"Beide Zahlen sind gleich."
;
}
catch
(
Exception
ex
)
{
MessageBox
.
Show
(
ex
.
Message
);
txt_zahl1
.
Focus
();
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment