private void write(string text)
        {
            var config = new ConfigurationFormWriter(false, new ConfigParser("").Parse(), new MSBuildLocator());
            config.SetIgnoreThisUpgrade(text);

            var writer = new ConfigWriter();
            var file = config.Configuration.ConfigurationFullpath;
            var content = writer.Transform(config.Configuration);
            saveConfiguration(file, content);
        }
 private void saveDisableAnonFeedback()
 {
     if (_anonFeedbackOriginalValue == checkBoxAnalytics.Checked)
         return;
     if (!_isLocal)
     {
         _writer.Configuration.AnonFeedback.Exists = true;
         _writer.Configuration.AnonFeedback.Item = checkBoxAnalytics.Checked;
         return;
     }
     var config = new ConfigParser("").ParseGlobal();
     config.AnonFeedback.Exists = true;
     config.AnonFeedback.Item = checkBoxDisableAll.Checked;
     var content = new ConfigWriter().Transform(config);
     saveConfiguration(config.ConfigurationFullpath, content);
 }
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     saveDisableAll();
     saveDisableAnonFeedback();
     var writer = new ConfigWriter();
     var file = _writer.Configuration.ConfigurationFullpath;
     var content = writer.Transform(_writer.Configuration);
     saveConfiguration(file, content);
     notifyVM(file, content);
     Close();
 }
示例#4
0
 private void save(ConfigurationFormWriter formWriter, bool isLocal)
 {
     var writer = new ConfigWriter();
     var file = formWriter.Configuration.ConfigurationFullpath;
     var content = writer.Transform(formWriter.Configuration);
     saveConfiguration(file, content);
     notifyVM(file, content, isLocal);
 }