Private
Public Access
Added interface for variables inside drawer
This commit is contained in:
1 parent
5e4829cb65
commit
db3e89a305
1 file changed
+13
-1
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Advanced_Software_Engineering.Verbs.Value;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
@@ -45,6 +47,8 @@ namespace Advanced_Software_Engineering {
|
||||
/// </summary>
|
||||
protected Graphics graphics;
|
||||
|
||||
protected Dictionary<string, IValue> variables = new Dictionary<string, IValue>();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new drawer object.
|
||||
/// </summary>
|
||||
@@ -183,5 +187,13 @@ namespace Advanced_Software_Engineering {
|
||||
public void DrawDot() {
|
||||
graphics.FillRectangle(new SolidBrush(pen.Color), penPosition.X, penPosition.Y, 1, 1);
|
||||
}
|
||||
|
||||
public void SetVariable(string name, IValue value) {
|
||||
variables.Add(name, value);
|
||||
}
|
||||
|
||||
public IValue GetVariable(string name) {
|
||||
return variables[name];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user