Esempio n. 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // instantiate a new userinfo model in controller
            UserInfo info = new UserInfo();

            // instantiate form1
            var form1 = new FirstForm();

            // controller interact w/ model
            // form1 can getUserInfo or setUserInfo
            form1.UserInfo = info;
            // controller interact w/ view
            form1.ShowDialog();

            var form2 = new View.SecondForm();

            form2.UserInfo = info;
            form2.ShowDialog();


            Application.Run(new FirstForm());
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            UserInfo info = new UserInfo();

            var f1 = new FirstForm();

            f1.UserInfo = info;
            f1.ShowDialog();

            var f2 = new View.SecondForm();

            f2.UserInfo = info;
            f2.ShowDialog();

            //Application.Run();
        }