|
Wersja 2, 0.9 KB
(wprowadzona przez dorota, 17 years temu)
|
|
|
| Line | |
|---|
| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.ComponentModel;
|
|---|
| 4 | using System.Data;
|
|---|
| 5 | using System.Drawing;
|
|---|
| 6 | using System.Text;
|
|---|
| 7 | using System.Windows.Forms;
|
|---|
| 8 |
|
|---|
| 9 | namespace Baza_Reklam
|
|---|
| 10 | {
|
|---|
| 11 | public partial class KursyWalutPoznan : Form
|
|---|
| 12 | {
|
|---|
| 13 |
|
|---|
| 14 | private decimal kursSredni;
|
|---|
| 15 |
|
|---|
| 16 | public decimal KursSredni
|
|---|
| 17 | {
|
|---|
| 18 | get { return kursSredni; }
|
|---|
| 19 | set { kursSredni = value; }
|
|---|
| 20 |
|
|---|
| 21 | }
|
|---|
| 22 | public KursyWalutPoznan(decimal kurs)
|
|---|
| 23 | {
|
|---|
| 24 | InitializeComponent();
|
|---|
| 25 | kursSredni = kurs;
|
|---|
| 26 | textBox1.Text = kursSredni.ToString();
|
|---|
| 27 |
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | private void button1_Click(object sender, EventArgs e)
|
|---|
| 31 | {
|
|---|
| 32 | if (Decimal.TryParse(textBox1.Text, out this.kursSredni))
|
|---|
| 33 | {
|
|---|
| 34 | this.Close();
|
|---|
| 35 | }
|
|---|
| 36 | else
|
|---|
| 37 | {
|
|---|
| 38 | MessageBox.Show("Podaj poprawny kurs");
|
|---|
| 39 | }
|
|---|
| 40 | }
|
|---|
| 41 | }
|
|---|
| 42 | } |
|---|
Notatka: Zobacz
TracBrowser
aby uzyskać więcej informacji.