39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Contime.controller;
|
|
using Contime.data;
|
|
using Contime.model;
|
|
using Contime.view;
|
|
|
|
namespace Contime {
|
|
internal static class Program {
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main() {
|
|
// --- FIX: Initialize the SQLite provider ---
|
|
SQLitePCL.Batteries.Init();
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
// --- Dependency Injection Setup ---
|
|
// 1. Create the DataAccess layer
|
|
var dataAccess = new DataAccess("contime.db");
|
|
dataAccess.InitializeDatabase();
|
|
|
|
// 2. Create the Model
|
|
var model = new TimeTrackerModel(dataAccess);
|
|
|
|
// 3. Create the View
|
|
var view = new MainForm();
|
|
|
|
// 4. Create the Controller
|
|
var controller = new TimeTrackerController(model, view);
|
|
|
|
// 5. Run the application
|
|
Application.Run(view);
|
|
}
|
|
}
|
|
}
|
|
|