mirror of
https://github.com/Alvin-Zilverstand/ict-algemeen-opdrachten.git
synced 2026-03-06 11:06:59 +01:00
Enhance MainForm layout with improved styling and add regions for better code organization
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
#region Bankrekening Class
|
||||||
class Bankrekening
|
class Bankrekening
|
||||||
{
|
{
|
||||||
public string Rekeningnummer { get; }
|
public string Rekeningnummer { get; }
|
||||||
@@ -51,7 +53,9 @@ class Bankrekening
|
|||||||
return transacties;
|
return transacties;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Transactie Class
|
||||||
class Transactie
|
class Transactie
|
||||||
{
|
{
|
||||||
public decimal Bedrag { get; }
|
public decimal Bedrag { get; }
|
||||||
@@ -65,7 +69,9 @@ class Transactie
|
|||||||
Datum = DateTime.Now;
|
Datum = DateTime.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MainForm Class
|
||||||
public class MainForm : Form
|
public class MainForm : Form
|
||||||
{
|
{
|
||||||
private Bankrekening mijnRekening;
|
private Bankrekening mijnRekening;
|
||||||
@@ -79,11 +85,45 @@ public class MainForm : Form
|
|||||||
{
|
{
|
||||||
mijnRekening = new Bankrekening("NL01BANK0123456789", 1000);
|
mijnRekening = new Bankrekening("NL01BANK0123456789", 1000);
|
||||||
|
|
||||||
saldoLabel = new Label() { Text = $"Saldo: {mijnRekening.ControleerSaldo()}", Top = 20, Left = 20, Width = 200 };
|
saldoLabel = new Label()
|
||||||
bedragTextBox = new TextBox() { Top = 50, Left = 20, Width = 200 };
|
{
|
||||||
stortenButton = new Button() { Text = "Storten", Top = 80, Left = 20 };
|
Text = $"Saldo: {mijnRekening.ControleerSaldo()}",
|
||||||
opnemenButton = new Button() { Text = "Opnemen", Top = 110, Left = 20 };
|
Top = 20,
|
||||||
transactieGeschiedenisButton = new Button() { Text = "Transactiegeschiedenis", Top = 140, Left = 20 };
|
Left = 20,
|
||||||
|
Width = 200,
|
||||||
|
Font = new Font("Arial", 12, FontStyle.Bold)
|
||||||
|
};
|
||||||
|
bedragTextBox = new TextBox()
|
||||||
|
{
|
||||||
|
Top = 50,
|
||||||
|
Left = 20,
|
||||||
|
Width = 200,
|
||||||
|
Font = new Font("Arial", 10)
|
||||||
|
};
|
||||||
|
stortenButton = new Button()
|
||||||
|
{
|
||||||
|
Text = "Storten",
|
||||||
|
Top = 80,
|
||||||
|
Left = 20,
|
||||||
|
Width = 200,
|
||||||
|
Font = new Font("Arial", 10)
|
||||||
|
};
|
||||||
|
opnemenButton = new Button()
|
||||||
|
{
|
||||||
|
Text = "Opnemen",
|
||||||
|
Top = 110,
|
||||||
|
Left = 20,
|
||||||
|
Width = 200,
|
||||||
|
Font = new Font("Arial", 10)
|
||||||
|
};
|
||||||
|
transactieGeschiedenisButton = new Button()
|
||||||
|
{
|
||||||
|
Text = "Transactiegeschiedenis",
|
||||||
|
Top = 140,
|
||||||
|
Left = 20,
|
||||||
|
Width = 200,
|
||||||
|
Font = new Font("Arial", 10)
|
||||||
|
};
|
||||||
|
|
||||||
stortenButton.Click += StortenButton_Click;
|
stortenButton.Click += StortenButton_Click;
|
||||||
opnemenButton.Click += OpnemenButton_Click;
|
opnemenButton.Click += OpnemenButton_Click;
|
||||||
@@ -94,6 +134,10 @@ public class MainForm : Form
|
|||||||
Controls.Add(stortenButton);
|
Controls.Add(stortenButton);
|
||||||
Controls.Add(opnemenButton);
|
Controls.Add(opnemenButton);
|
||||||
Controls.Add(transactieGeschiedenisButton);
|
Controls.Add(transactieGeschiedenisButton);
|
||||||
|
|
||||||
|
Text = "Bankrekening Beheer";
|
||||||
|
Size = new Size(300, 250);
|
||||||
|
StartPosition = FormStartPosition.CenterScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StortenButton_Click(object sender, EventArgs e)
|
private void StortenButton_Click(object sender, EventArgs e)
|
||||||
@@ -135,7 +179,9 @@ public class MainForm : Form
|
|||||||
MessageBox.Show(geschiedenis);
|
MessageBox.Show(geschiedenis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Program Class
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
static void Main()
|
static void Main()
|
||||||
@@ -155,3 +201,4 @@ class Program
|
|||||||
Application.Run(new MainForm());
|
Application.Run(new MainForm());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Bankrekening")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("Bankrekening")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c4b64f4b50c5c1d9dde01c74db22a390f1ee96e2")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+eaaf39d0c92d3e661fdbd63b97c63ea70e57aae1")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("Bankrekening")]
|
[assembly: System.Reflection.AssemblyProductAttribute("Bankrekening")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("Bankrekening")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("Bankrekening")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
7dfdf5a6a12f573f8f4981c1d44449ad7725987752c5312fba103f25cf5eccb9
|
570f059670e381a36f19d47dad73e3c3996ea009c5141deac1b64e5e409a6da8
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
|||||||
{"documents":{"C:\\Users\\steen\\Desktop\\Alvin\\ict-algemeen-opdrachten\\*":"https://raw.githubusercontent.com/Alvin-Zilverstand/ict-algemeen-opdrachten/c4b64f4b50c5c1d9dde01c74db22a390f1ee96e2/*"}}
|
{"documents":{"C:\\Users\\steen\\Desktop\\Alvin\\ict-algemeen-opdrachten\\*":"https://raw.githubusercontent.com/Alvin-Zilverstand/ict-algemeen-opdrachten/eaaf39d0c92d3e661fdbd63b97c63ea70e57aae1/*"}}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user