public void LoadSettings(ProjectConfig[] configs)
 {
     originalConfig = Configuration.Build.LoadFrom(configs);
     config = originalConfig.Clone();
     customTargetBox.Text = config.PlatformTarget;
     customTargetBox.TextChanged += (src,arg) => config.PlatformTarget = customTargetBox.Text;
     if(config.OptimizationLevel.HasValue)
         optimizationBox.SelectedIndex = (int)config.OptimizationLevel.Value;
     else
         optimizationBox.SelectedItem = null;
     optimizationBox.SelectedIndexChanged += (src,arg) => config.OptimizationLevel = (OptimizationLevel)optimizationBox.SelectedIndex;
     lto.CheckState = ToCheckState(config.LTO);
     lto.CheckedChanged += (src,arg) => config.LTO = lto.Checked;
     emitDebug.CheckState = ToCheckState(config.EmitDebug);
     emitDebug.CheckedChanged += (src,arg) => config.EmitDebug = emitDebug.Checked;
     config.Changed += (src, arg) => isDirty(config.HasChangedFrom(originalConfig));
 }
Beispiel #2
0
 public void LoadSettings(ProjectConfig[] configs)
 {
     originalConfig               = Configuration.Build.LoadFrom(configs);
     config                       = originalConfig.Clone();
     customTargetBox.Text         = config.PlatformTarget;
     customTargetBox.TextChanged += (src, arg) => config.PlatformTarget = customTargetBox.Text;
     if (config.OptimizationLevel.HasValue)
     {
         optimizationBox.SelectedIndex = (int)config.OptimizationLevel.Value;
     }
     else
     {
         optimizationBox.SelectedItem = null;
     }
     optimizationBox.SelectedIndexChanged += (src, arg) => config.OptimizationLevel = (OptimizationLevel)optimizationBox.SelectedIndex;
     lto.CheckState            = ToCheckState(config.LTO);
     lto.CheckedChanged       += (src, arg) => config.LTO = lto.Checked;
     emitDebug.CheckState      = ToCheckState(config.EmitDebug);
     emitDebug.CheckedChanged += (src, arg) => config.EmitDebug = emitDebug.Checked;
     config.Changed           += (src, arg) => isDirty(config.HasChangedFrom(originalConfig));
 }
 public void ApplyConfig(ProjectConfig[] configs)
 {
     config.SaveTo(configs);
     originalConfig = config.Clone();
 }
Beispiel #4
0
 public void ApplyConfig(ProjectConfig[] configs)
 {
     config.SaveTo(configs);
     originalConfig = config.Clone();
 }