Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Model model = new Model(0);
            View view = new View();
            Controller controller = new Controller(view, model);

            Application.Run(view);
        }
Beispiel #2
0
        public Controller(View view, Model model)
        {
            _view = view;
            _model = model;

            // Initialize the View
            _view.textBox1.Text = _model.GetCounter.ToString();

            // Attach to events
            _view.button1Pressed += new View.SimpleDelegate(Button1Pressed);
        }