static void Main(string[] args) { Thread.CurrentThread.Name = "NeoMainThread"; InitializeBeHwApiLog(); UserStartupMessage.SendUserStartupMessageToBeijerShell("Loading Files"); if (!StopWatchCF.Silent) { StopWatchCF.Send("Starting Project"); } StopWatchCF.SetTimestamp("***** Project Startup Time *****"); while (ProcessExplorer.WaitForAttachDebugger) { Thread.Sleep(1000); } IsCompiledForCE = true; IsCompiledForDesktopWindowsPanel = false; Instance = new Globals(); if (!Instance.CheckIfApplicationCanRun()) { return; } string executingAssemblyName = Assembly.GetExecutingAssembly().FullName; string executablePath = typeof(Globals).Module.FullyQualifiedName; Instance.Go(executingAssemblyName, executablePath, args, new string[] { "Expressions", "Tags", "AlarmServer", "Security", "Rezonans", "RS232", "WebServer", "Tablolar", "Test" }, new string[] {}, () => Screen1); }
static void Main(string[] args) { Thread.CurrentThread.Name = "NeoMainThread"; InitializeBeHwApiLog(); UserStartupMessage.SendUserStartupMessageToBeijerShell("Loading Files"); if (!StopWatchCF.Silent) { StopWatchCF.Send("Starting Project"); } StopWatchCF.SetTimestamp("***** Project Startup Time *****"); while (ProcessExplorer.WaitForAttachDebugger) { Thread.Sleep(1000); } IsCompiledForCE = true; IsCompiledForDesktopWindowsPanel = false; Instance = new Globals(); if (!Instance.CheckIfApplicationCanRun()) { return; } string executingAssemblyName = Assembly.GetExecutingAssembly().FullName; string executablePath = typeof(Globals).Module.FullyQualifiedName; Instance.Go(executingAssemblyName, executablePath, args, new string[] { "Tags", "AlarmServer", "MultipleLanguages", "Expressions", "LicenseRootComponent", "ProjectConfiguration", "Security", "SntpClientRootComponent", "Controller2", "TestingFilterScript", "AutomaticWashingScript", "DryingScript", "BlinkScript", "CycleTimerScript", "PrewashScript", "WashingScript", "WashDryingScript", "BuzzerScript", "ManuelWashingScript", "PressureCalibrationScript", "ProjectImages" }, new string[] {}, () => HomeScreen); }
static void Main(string[] args) { if (!CheckIfApplicationCanRun()) { return; } UserStartupMessage.SendUserStartupMessageToBeijerShell("Loading Files"); if (!StopWatchCF.Silent) { StopWatchCF.Send("Starting Project"); } StopWatchCF.SetTimeStamp("***** Project Startup Time *****"); while (ProcessExplorer.WaitForAttachDebugger) { Thread.Sleep(1000); } IsCompiledForCE = true; Instance = new Globals(); try { m_Arguments = args; m_ToolManager.OnToolAdded += OnToolAdded; m_ToolManager.LoadTools(); SetRenderingMode(); INativeAPI nativeAPI = Globals.GetService <IPlatformFactoryService>().Create <INativeAPI>(); CreateMutex(nativeAPI); if (Marshal.GetLastWin32Error() != (int)CREATEMUTEX.ERROR_ALREADY_EXISTS) { ((Globals)Instance).SetBeShellMenuPassword(); ((Globals)Instance).SetScreenOrientation(); ((Globals)Instance).SetSerialPortMode(); ((Globals)Instance).SetKeyBeep(); ((Globals)Instance).ConfigureFtpServer(); ((Globals)Instance).StartVncServerCe(); nativeAPI.CeSetThreadQuantum(new IntPtr(65), 25); InterpreterArguments(args); ExecutablePath = typeof(Globals).Module.FullyQualifiedName; RegisterDrivers(); NeoApplication.Initialize(); m_ToolManager.Start(); Instanciate(new string[] { "TextLibrary", "Security", "Tags", "MultipleLanguages", "LicenseRootComponent", "AlarmServer", "Expressions", "Database", "ProjectConfiguration", "FunctionKeys", "ScriptModule1", "ProjectImages" }); PreloadScreens = new string[] {}.Select(item => Type.GetType(string.Concat(StringConstants.NeoApplicationFrameworkGenerated, ".", item, ",", Assembly.GetExecutingAssembly().FullName), true)).ToArray(); InitAndRun(); NeoApplication.Run(Screen1.AdaptedObject); CloseRunningOnScreenKeyboard(); CloseRunningVncserverCe(); } m_ToolManager.StopStoppable(); Stop(); } catch (ControledRequestForShutdownException ex) { MessageBox.Show(ex.Message); } catch (Exception ex) { GenerateCrashReport(ex); ManageUnhandledException(ex, true); m_ShowUnhandledException = false; throw; //Preserves stacktrace and triggers Dr Watson to create dump file. } }