int xPos, yPos; //pens position /// <summary> /// Creates basic tools for canvas. /// </summary> /// <param name="g"></param> /// <param name="varCommand"></param> public CanvasCommands(Graphics g, VarCommand varCommand) { this.g = g; xPos = yPos = 5; pen = new Pen(Color.Red, 1); g.DrawEllipse(pen, xPos, yPos, 5, 5); //makes that dot, so pens visible }
public Form1() { InitializeComponent(); Canvas = new CanvasCommands(Graphics.FromImage(OutputBitmap), varCommand); //passes bitmap thru the graphics area (on the OutputArea below) varCommand = new VarCommand(); loopCommand = new LoopCommand(); ifElseCommands = new IfElseCommands(varCommand); methodCommand = new MethodCommand(); }
/// <summary> /// Uses variables made by user. /// </summary> /// <param name="varCommand"></param> public IfElseCommands(VarCommand varCommand) // when a var is given after if/else declared { this.varCommand = varCommand; }
/// <summary> /// Uses Variable class for parsing. /// </summary> /// <param name="varCommand"></param> public CommandParser(VarCommand varCommand) { this.varCommand = varCommand; }