2020-07-09 21:10:31 +03:00
|
|
|
|
#region Usings
|
2020-07-15 03:28:34 +03:00
|
|
|
|
using NLog;
|
2023-01-05 19:07:51 +02:00
|
|
|
|
using Novetus.Core;
|
2020-07-09 21:10:31 +03:00
|
|
|
|
using System;
|
2020-07-15 03:28:34 +03:00
|
|
|
|
using System.IO;
|
2021-09-13 04:38:58 +03:00
|
|
|
|
using System.Threading;
|
2020-04-14 01:31:21 +03:00
|
|
|
|
using System.Windows.Forms;
|
2020-07-09 21:10:31 +03:00
|
|
|
|
#endregion
|
2020-04-14 01:31:21 +03:00
|
|
|
|
|
|
|
|
|
namespace NovetusURI
|
|
|
|
|
{
|
2020-07-09 21:10:31 +03:00
|
|
|
|
#region Novetus URI Main Class
|
|
|
|
|
internal sealed class NovetusURI
|
2020-04-14 01:31:21 +03:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Program entry point.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
|
|
|
|
private static void Main(string[] args)
|
|
|
|
|
{
|
2021-11-10 01:12:53 +02:00
|
|
|
|
Application.EnableVisualStyles();
|
|
|
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
|
|
2022-06-02 21:54:02 +03:00
|
|
|
|
if (!Directory.Exists(GlobalPaths.LogDir))
|
|
|
|
|
{
|
|
|
|
|
Directory.CreateDirectory(GlobalPaths.LogDir);
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-15 03:28:34 +03:00
|
|
|
|
var config = new NLog.Config.LoggingConfiguration();
|
2022-06-02 21:54:02 +03:00
|
|
|
|
var logfile = new NLog.Targets.FileTarget("logfile") { FileName = GlobalPaths.LogDir + "\\URI-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log" };
|
2021-11-13 22:56:56 +02:00
|
|
|
|
config.AddRuleForAllLevels(logfile);
|
2020-07-15 03:28:34 +03:00
|
|
|
|
LogManager.Configuration = config;
|
|
|
|
|
|
2023-11-24 21:59:01 +02:00
|
|
|
|
//FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
|
|
|
|
//GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName);
|
2022-09-13 00:26:34 +03:00
|
|
|
|
GlobalVars.ColorsLoaded = FileManagement.InitColors();
|
2020-04-14 01:31:21 +03:00
|
|
|
|
if (args.Length == 0)
|
|
|
|
|
{
|
2020-07-07 21:31:56 +03:00
|
|
|
|
Application.Run(new InstallForm());
|
2020-04-14 01:31:21 +03:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
foreach (string s in args)
|
|
|
|
|
{
|
2020-07-12 19:48:47 +03:00
|
|
|
|
LocalVars.SharedArgs = s;
|
2020-04-14 01:31:21 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Application.Run(new LoaderForm());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-07-09 21:10:31 +03:00
|
|
|
|
#endregion
|
2020-04-14 01:31:21 +03:00
|
|
|
|
}
|