private void Form1_Load(object sender, EventArgs e) { Graphics g = panel1.CreateGraphics(); controller = new BlockController(g, this.Font, panel1.Size, () => MakeTextBox()); controller.Modified += new ControllerModified(controller_Modified); document = new Document("Kitsune"); document.TitleChange += new TitleChangeEvent(document_TitleChange); document.SetTitle(); RegisterMethods(); controller.InitPalette(); // after methods are registered vm = new VM.VM(); compiler = new Compiler(vm, controller.GetBlockSpace()); runForm = panel2; //runForm.Location = this.Location; //runForm.Size = this.Size; runGraphics = runForm.CreateGraphics(); stage = new Stage.Stage(runGraphics, this.Font, runForm.ClientSize); kitsune = new Sprite(BitmapExtensions.LoadBmp("kitsune2.bmp"), runForm.ClientRectangle.Center().Offseted(-15, -15), true, -90); runForm.Paint += new PaintEventHandler(runForm_Paint); runForm.DoubleClick += new EventHandler(runForm_DoubleClick); stage.AddSprite(kitsune); stage.RedrawAll(); PrepareVM(vm, stage); PrepareCompiler(compiler); // I really should use a testing framework // testSplitFuncArgs(); // testCBlockView(new Point(10, 10)); // testReporterBlockView(new Point(250, 10)); // testBlockStackView(new Point(450, 10)); }