aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <marcin@zelent.net>2021-02-21 14:13:49 +0100
committermarcinzelent <marcin@zelent.net>2019-12-20 14:21:37 +0100
commitb1eb36d3fbc5012b07489454a7452e8488507f6a (patch)
treef6a9e6e561eabde5b06366a6aeac78df123ca917 /Views/View.cs
Initial commitHEADmaster
Diffstat (limited to 'Views/View.cs')
-rw-r--r--Views/View.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Views/View.cs b/Views/View.cs
new file mode 100644
index 0000000..5db14c9
--- /dev/null
+++ b/Views/View.cs
@@ -0,0 +1,24 @@
+using System;
+using KukaPizza.Controllers;
+
+namespace KukaPizza.Views
+{
+ public abstract class View
+ {
+ private Controller _controller;
+ public void Init(Controller controller)
+ {
+ _controller = controller;
+ Draw();
+ Interact();
+ }
+
+ protected abstract void Draw();
+ protected abstract void Interact();
+
+ public void NavigateTo(Type view)
+ {
+ Activator.CreateInstance(view, _controller);
+ }
+ }
+} \ No newline at end of file