Novetus_src/Novetus/NovetusURI/NovetusURI.cs

54 lines
1.6 KiB
C#
Raw Normal View History

2020-07-09 21:10:31 +03:00
#region Usings
2020-07-15 03:28:34 +03:00
using NLog;
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;
using System.Windows.Forms;
2020-07-09 21:10:31 +03:00
#endregion
namespace NovetusURI
{
2020-07-09 21:10:31 +03:00
#region Novetus URI Main Class
internal sealed class NovetusURI
{
/// <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);
if (!Directory.Exists(GlobalPaths.LogDir))
{
Directory.CreateDirectory(GlobalPaths.LogDir);
}
2020-07-15 03:28:34 +03:00
var config = new NLog.Config.LoggingConfiguration();
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();
if (args.Length == 0)
{
2020-07-07 21:31:56 +03:00
Application.Run(new InstallForm());
}
else
{
foreach (string s in args)
{
LocalVars.SharedArgs = s;
}
Application.Run(new LoaderForm());
}
}
}
2020-07-09 21:10:31 +03:00
#endregion
}