static void Main(string[] args) { //Helper.CheckDirectories(); var CurrentDomain = AppDomain.CurrentDomain.BaseDirectory; var GetDirectoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Console.WriteLine("AppDomain.CurrentDomain.BaseDirectory: {0}", CurrentDomain); Console.WriteLine("Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location): {0}", GetDirectoryName); ManualResetEvent manualResetEvent = new ManualResetEvent(true); manualResetEvent.WaitOne(); ConsoleWriteLine.WriteInConsole(null, null, null, "Project started", ConsoleColor.White); Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime; Process.GetCurrentProcess().PriorityBoostEnabled = true; Helper_WINWORD.Clear(); Helper_EXCEL.Clear(); ClearNormal(); ProgressOfUpdateAtStructAttribute Standart = (ProgressOfUpdateAtStructAttribute)ParentMethods.GetStandart().Clone_Full(); ValueForClient.DeserializeConfig(new TimeSpan(0, 5, 0)); // Deserialization data'es if (ValueForClient.ReadyStructure.ProgressOfUpdate is null ? true : ValueForClient.ReadyStructure.ProgressOfUpdate.List_ProgressOfUpdateAtStructAttribute.Count != 1) { Progress = Standart; ValueForClient.ReadyStructure.ProgressOfUpdate = new ProgressOfUpdate() { List_ProgressOfUpdateAtStructAttribute = new List <ProgressOfUpdateAtStructAttribute>() { Progress } }; }
static void Main(string[] args) { if (Thread.CurrentThread.Name is null) { Thread.CurrentThread.Name = nameof(Main); } Process.GetCurrentProcess().PriorityBoostEnabled = true; Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High; Thread.CurrentThread.Priority = ThreadPriority.Highest; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ValueForClient.TimerStart(TimeSpan.FromMinutes(2)); // Таймер для GC.Collect(); ProgressOfUpdateAtStructAttribute.WriteInConsole_Default = false; ConsoleWriteLine.WriteInConsole_Default = false; Application.Run(new OtherForm.Authorization()); }