Beispiel #1
0
        public EditProcDefController NewProcDef(Func <TextBox> textBoxMaker, Button eraseButton)
        {
            ProcDefBlock block = new ProcDefBlock();
            ProcDefView  view  = (ProcDefView)viewFactory.ViewFromBlock(block);

            EditProcDefController controller = new EditProcDefController(view, block, viewFactory, textBoxMaker, eraseButton);

            return(controller);
        }
Beispiel #2
0
        private void defineNewProcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditProcDefForm       form          = new EditProcDefForm();
            EditProcDefController subController = controller.NewProcDef(() => form.MakeTextBox(), form.GetEraseButton());

            form.SetController(subController);
            form.StartPosition = FormStartPosition.CenterParent;
            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                controller.DefineNewProc(subController.Model, "My blocks");
            }
        }
Beispiel #3
0
 public void SetController(EditProcDefController controller)
 {
     this.controller = controller;
     this.controller.Changed += new EditProcDefControllerChangedEvent(controller_Changed);
     controller.SetGrapics(panel1.CreateGraphics());
 }
Beispiel #4
0
 public void SetController(EditProcDefController controller)
 {
     this.controller          = controller;
     this.controller.Changed += new EditProcDefControllerChangedEvent(controller_Changed);
     controller.SetGrapics(panel1.CreateGraphics());
 }
Beispiel #5
0
        public EditProcDefController NewProcDef(Func<TextBox> textBoxMaker, Button eraseButton)
        {
            ProcDefBlock block = new ProcDefBlock();
            ProcDefView view = (ProcDefView) viewFactory.ViewFromBlock(block);

            EditProcDefController controller = new EditProcDefController(view, block, viewFactory, textBoxMaker, eraseButton);
            return controller;
        }