public static void RunSourceForm_CreateForm() { if (_rs.IsRunning()) { Trace.WriteLine("execute with shift F5 to use main thread for creating form"); return; } RunSourceForm form = new RunSourceForm(); form.Show(); }
static void Main() { try { XmlConfig config = new XmlConfig(); //Trace.CurrentTrace.SetLogFile("log.txt", LogOptions.None); //string path = config.Get("Log").zSetRootDirectory(); //if (path != null) // _runSource.Trace.SetLogFile(path, LogOptions.IndexedFile); //Trace.WriteLine(config.Get("Log").zSetRootDirectory()); //LogOptions logOptions = config.Get("Log/@LogOptions").zTextDeserialize(LogOptions.None); //Trace.WriteLine(logOptions.ToString()); //Trace.CurrentTrace.SetLogFile(config.Get("Log").zSetRootDirectory(), config.Get("Log/@LogOptions").zTextDeserialize(LogOptions.None)); //Trace.WriteLine(Trace.CurrentTrace.GetLogFile()); FormatInfo.SetInvariantCulture(); Application.CurrentCulture = FormatInfo.CurrentFormat.CurrentCulture; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); RemoteRunSource remoteRunSource = new RemoteRunSource(); remoteRunSource.RunsourceDllFilename = config.GetExplicit("RunsourceDllFilename"); remoteRunSource.RunsourceClassName = config.GetExplicit("RunsourceClassName"); remoteRunSource.TraceClassName = config.GetExplicit("TraceClassName"); //remoteRunSource.CreateRunSourceDomain = config.Get("CreateRunSourceDomain").zTryParseAs<bool>(true); // ATTENTION si CreateRunSourceDomain = true runsource.launch.exe ne peut pas mettre à jour runsource.runsource.exe remoteRunSource.CreateRunSourceDomain = config.Get("CreateRunSourceDomain").zTryParseAs<bool>(false); IRunSource runSource = remoteRunSource.GetRunSource(); runSource.AllowMultipleExecution = config.Get("AllowMultipleExecution").zTryParseAs(false); // ATTENTION Trace exists in both 'runsource.runsource.exe' and 'runsource.dll' // donc il faut utiliser RemoteRunSource.GetTrace() ITrace trace = remoteRunSource.GetTrace(); //trace.SetLogFile(config.Get("Log").zRootPath(zapp.GetAppDirectory()), config.Get("Log/@LogOptions").zTextDeserialize(LogOptions.None)); // .zRootPath(zapp.GetAppDirectory()) trace.SetWriter(config.Get("Log"), config.Get("Log/@option").zTextDeserialize(FileOption.None)); //runSource.GenerateAndExecuteManager.GenerateAssemblyDirectory = config.Get("GenerateAssemblyDirectory", "run").zRootPath(zapp.GetAppDirectory()); // ATTENTION appeler DeleteGeneratedAssemblies() après SetRunSourceConfig() //runSource.DeleteGeneratedAssemblies(); //RunSourceForm_v1 form = new RunSourceForm_v1(runSource, trace, config, GetRunSourceRestartParameters()); RunSourceForm form = new RunSourceForm(runSource, trace, config, GetRunSourceRestartParameters()); //form.UpdateRunsourceFiles += FormUpdateRunsourceFiles; form.SetRestartRunsource += FormSetRestartRunsource; Application.Run(form); //if (_projectFiles != null) SetRunSourceRestartParameters(); //SetRunSourceUpdateParameters(); //if (_updateProgram) //{ // _updateProgram = false; // return 1; //} //else // return 0; //Application.Exit(); } catch (Exception ex) { zerrf.ErrorMessageBox(ex); //return 0; } }
//public static void Test_Form_01() //{ // Form1 form1 = new Form1(); // form1.Show(); //} public static void Test_RunSourceForm_01(int version) { RunSourceForm form = new RunSourceForm(version); form.Show(); }
public static void RunSourceForm_CreateForm() { if (_rs.IsRunning()) { Trace.WriteLine("execute with shift F5 to use main thread for creating form"); return; } RunSourceForm form = new RunSourceForm(); form.Show(); }