X
xXKeLLerman
Guest
So i have made a Program and i want to edit that programs ints and stings, then build it with that information with my other Program (the builder). Is this possible ? and how do i do it?
I was already working on CodeDom:
public static bool Compile (string Output, string Source, string Icon, string resources)
{
CompilerParameters Parameters = new CompilerParameters();
CompilerResults cresults = default(CompilerResults);
Dictionary<string, string> providerOptions = new Dictionary<string, string>();
providerOptions.Add("CompilerVersion", "2.0");
CSharpCodeProvider Compiler = new CSharpCodeProvider(providerOptions);
Parameters.GenerateExecutable = true;
Parameters.TreatWarningsAsErrors = false;
Parameters.OutputAssembly = Output;
Parameters.EmbeddedResources.Add("System.dll");
Parameters.CompilerOptions = "/platform:x86";
if (!string.IsNullOrEmpty(Icon))
{
Parameters.CompilerOptions += " /win32icon" + Icon;
}
cresults = Compiler.CompileAssemblyFromSource(Parameters, Source);
if (cresults.Errors.Count > 0)
{
foreach (CompilerError compile_error in cresults.Errors)
{
CompilerError error = compile_error;
Console.Beep();
Console.WriteLine("Error: " + error.ErrorText + "\r\n" + error.Line, "");
}
return false;
}
return true;
Continue reading...
I was already working on CodeDom:
public static bool Compile (string Output, string Source, string Icon, string resources)
{
CompilerParameters Parameters = new CompilerParameters();
CompilerResults cresults = default(CompilerResults);
Dictionary<string, string> providerOptions = new Dictionary<string, string>();
providerOptions.Add("CompilerVersion", "2.0");
CSharpCodeProvider Compiler = new CSharpCodeProvider(providerOptions);
Parameters.GenerateExecutable = true;
Parameters.TreatWarningsAsErrors = false;
Parameters.OutputAssembly = Output;
Parameters.EmbeddedResources.Add("System.dll");
Parameters.CompilerOptions = "/platform:x86";
if (!string.IsNullOrEmpty(Icon))
{
Parameters.CompilerOptions += " /win32icon" + Icon;
}
cresults = Compiler.CompileAssemblyFromSource(Parameters, Source);
if (cresults.Errors.Count > 0)
{
foreach (CompilerError compile_error in cresults.Errors)
{
CompilerError error = compile_error;
Console.Beep();
Console.WriteLine("Error: " + error.ErrorText + "\r\n" + error.Line, "");
}
return false;
}
return true;
Continue reading...