コード例 #1
0
 public void LoadSettings(CommonProjectNode node)
 {
     originalConfig                     = Configuration.Application.LoadFrom(node);
     config                             = originalConfig.Clone();
     crateBox.Text                      = config.CrateName;
     crateBox.TextChanged              += (src, arg) => config.CrateName = crateBox.Text;
     typeComboBox.SelectedIndex         = (int)config.OutputType;
     libraryGroup.Enabled               = config.OutputType == BuildOutputType.Library;
     typeComboBox.SelectedIndexChanged += (src, arg) =>
     {
         config.OutputType    = (BuildOutputType)typeComboBox.SelectedIndex;
         libraryGroup.Enabled = config.OutputType == BuildOutputType.Library;
     };
     buildDylib.Checked             = config.BuildDylib;
     buildDylib.CheckedChanged     += (src, arg) => config.BuildDylib = buildDylib.Checked;
     buildStaticlib.Checked         = config.BuildStaticlib;
     buildStaticlib.CheckedChanged += (src, arg) => config.BuildStaticlib = buildStaticlib.Checked;
     buildRlib.Checked              = config.BuildRlib;
     buildRlib.CheckedChanged      += (src, arg) => config.BuildRlib = buildRlib.Checked;
     MakeSureAtLeastOneLibraryTypeIsSelected();
     config.Changed += (src, arg) => isDirty(config.HasChangedFrom(originalConfig));
 }
コード例 #2
0
 public void LoadSettings(CommonProjectNode node)
 {
     originalConfig = Configuration.Application.LoadFrom(node);
     config = originalConfig.Clone();
     crateBox.Text = config.CrateName;
     crateBox.TextChanged += (src, arg) => config.CrateName = crateBox.Text;
     typeComboBox.SelectedIndex = (int)config.OutputType;
     libraryGroup.Enabled = config.OutputType == BuildOutputType.Library;
     typeComboBox.SelectedIndexChanged += (src, arg) =>
     {
         config.OutputType = (BuildOutputType)typeComboBox.SelectedIndex;
         libraryGroup.Enabled = config.OutputType == BuildOutputType.Library;
     };
     buildDylib.Checked = config.BuildDylib;
     buildDylib.CheckedChanged += (src, arg) => config.BuildDylib = buildDylib.Checked;
     buildStaticlib.Checked = config.BuildStaticlib;
     buildStaticlib.CheckedChanged += (src, arg) => config.BuildStaticlib = buildStaticlib.Checked;
     buildRlib.Checked = config.BuildRlib;
     buildRlib.CheckedChanged += (src, arg) => config.BuildRlib = buildRlib.Checked;
     MakeSureAtLeastOneLibraryTypeIsSelected();
     config.Changed += (src, arg) => isDirty(config.HasChangedFrom(originalConfig));
 }
コード例 #3
0
 public void ApplyConfig(CommonProjectNode node)
 {
     MakeSureAtLeastOneLibraryTypeIsSelected();
     config.SaveTo(node);
     originalConfig = config.Clone();
 }