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

            // create DB table if not created
            PinsRepository pinRepo = new PinsRepository();


            if (!pinRepo.checkIfTableExists("pins"))
            {
                pinRepo.createTable();
            }
            //else
            //{
            //    // for testing
            //    pinRepo.dropTable();
            //    pinRepo.createTable();
            //}

            Application.Run(new MainForm(pinRepo));
        }
Exemple #2
0
 public MainForm(PinsRepository pinRepo)
 {
     this._pinRepo = pinRepo;
     InitializeComponent();
 }