Esempio n. 1
0
        static void Main()
        {
            RepoInterface<Transaction> repo = new Repository<Transaction>();
            Validator val = new Validator(repo);
            Controller.Controller ctrl = new Controller.Controller(repo,val);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new HomeForm(ctrl));
        }
Esempio n. 2
0
        static void Main()
        {
            RepoInterface <Transaction> repo = new Repository <Transaction>();
            Validator val = new Validator(repo);

            Controller.Controller ctrl = new Controller.Controller(repo, val);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new HomeForm(ctrl));
        }
Esempio n. 3
0
        public HomeForm(Controller.Controller ctrl)
        {
            this.ctrl = ctrl;
            try
            {
                ctrl.readFromFile("transactions.txt");
            }
            catch (MyException ex)
            {
                MessageBox.Show(ex.getMessage());
            }

            if (this.ctrl.errorCounter > 0)
            {
                MessageBox.Show("No of errors: " + this.ctrl.errorCounter);
            }

            this.Text = "Real Estate Agency";
            this.Size = new Size(600, 600);
            this.CenterToScreen();

            this.addListView();
            this.addButtons();
        }