-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
40 lines (35 loc) · 1.23 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using WhaleExtension.Presenter;
using WhaleExtension.Repositories;
using WhaleExtension.View;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WhaleExtension
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
string sqlConnectionString = ConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString;
IMainView mainView = new MainForm();
IInvoiceRepository invoiceRepository = new InvoiceRepository(sqlConnectionString);
DateTime dateTime = new DateTime(2023, 2, 5, 12, 12, 00, DateTimeKind.Utc);
if(DateTime.Now>dateTime)
{
MessageBox.Show("لطفا با پشتیبانی تماس بگیرید.");
return;
}
new InvoicePresenter(sqlConnectionString, mainView, invoiceRepository);
Application.Run((Form)mainView);
}
}
}