static void Main(string[] args) { //Always at least try to let our application code handle the exception. //Setting this to "catch" means the Application.ThreadException event //will fire first, essentially causing the app to crash right away and shut down. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); #if !MONO SplashScreenManager.DisplaySplashScreen(); #endif Platform.PluginManager.PluginLoaded += new EventHandler <PluginLoadedEventArgs>(OnPluginProgress); // check for command line arguments if (args.Length > 0) { // for the sake of simplicity, this is a naive implementation (probably needs to change in future) // if there is > 0 arguments, assume the first argument is a class name // and bundle the subsequent arguments into a secondary array which is // forwarded to the application root class string[] args1 = new string[args.Length - 1]; Array.Copy(args, 1, args1, 0, args1.Length); Platform.StartApp(args[0], args1); } else { Platform.StartApp(@"ClearCanvas.Desktop.Application", new string[0]); } }
private static void Main(string[] args) { //testOracle(); //Always at least try to let our application code handle the exception. //Setting this to "catch" means the Application.ThreadException event //will fire first, essentially causing the app to crash right away and shut down. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); #if !MONO SplashScreenManager.DisplaySplashScreen(); #endif Platform.PluginManager.PluginLoaded += new EventHandler <PluginLoadedEventArgs>(OnPluginProgress); // check for command line arguments //if (args.Length > 0) //{ // // for the sake of simplicity, this is a naive implementation (probably needs to change in future) // // if there is > 0 arguments, assume the first argument is a class name // // and bundle the subsequent arguments into a secondary array which is // // forwarded to the application root class // string[] args1 = new string[args.Length - 1]; // Array.Copy(args, 1, args1, 0, args1.Length); // Platform.StartApp(args[0], args1); //} //else //{ // Platform.StartApp(@"ClearCanvas.Desktop.Application", new string[0]); //} //Platform.StartApp(@"ClearCanvas.Desktop.Application", new string[0]); string str = Application.LocalUserAppDataPath; Platform.Log(LogLevel.Info, "the path is " + str); GlobalData.PacsIniFile = System.Windows.Forms.Application.StartupPath + @"\pacs.ini"; GlobalData.EfilmIniFile = System.Windows.Forms.Application.StartupPath + @"\efilm.ini"; GlobalData.RunParams = GlobalData.AnalyzeMain(args); GlobalData.ReadIniFile(); Platform.StartApp(@"ClearCanvas.Desktop.Application", args); }