ChrisCompleteCodeTrunk
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
using System.Reflection;
using System.Diagnostics;
using System.IO;
namespace EmailAndFaxWithStmt
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
private static string PdfFolderPath = ConfigurationManager.AppSettings["PdfFolderPath"];
///
static void Main()
{
if (ConfigurationManager.AppSettings["AssemblyVersion"] != Assembly.GetExecutingAssembly().GetName().Version.ToString())
{
EventLog.WriteEntry(Configuration.LogSource, string.Format("The version you are using is not the latest version. Please contact your administrator."), EventLogEntryType.Error);
return;
}
try
{
string[] deletepaths = Directory.GetFiles(PdfFolderPath);
foreach (string deletepath in deletepaths)
File.Delete(deletepath);
}
catch
{
if(!Directory.Exists(PdfFolderPath))
{
Directory.CreateDirectory(PdfFolderPath);
}
}
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new EFService()
};
ServiceBase.Run(ServicesToRun);
//For Debugging Uncomment the following 3 lines of code and comment the codes after that.
//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new EmailAndFaxForm());
}
}
}
|
Revision |
Author |
Commited |
Message |
1
|
BBDSCHRIS
|
Wed 22 Aug, 2018 20:08:03 +0000 |
|