Example #1
0
        // code for making an ATM assembly in its own thread;  C# requires that the parameter is typed "Object":
        static void makeATM(Object connectionToDB)
        {
            // first, make the ATM's controller and connect it to the database assembly:
            ATMControl t = new ATMControl((IDB)connectionToDB);   // cast the arg to its correct type

            // next, connect the ATM's form to its controller and Run it:
            Application.Run(new ATMForm(t));
        }
Example #2
0
        private ATMControl c;  // handle to the controller for this form

        public ATMForm(ATMControl c)
        {
            this.c = c;
            InitializeComponent();
        }