예제 #1
0
 private void ExportSettings()
 {
     using (var dialog = new SaveFileDialog
     {
         Filter = RubberduckUI.DialogMask_XmlFilesOnly,
         Title = RubberduckUI.DialogCaption_SaveToDoSettings
     })
     {
         dialog.ShowDialog();
         if (string.IsNullOrEmpty(dialog.FileName))
         {
             return;
         }
         var service = new XmlPersistanceService <ToDoListSettings> {
             FilePath = dialog.FileName
         };
         service.Save(new ToDoListSettings {
             ToDoMarkers = TodoSettings.Select(m => new ToDoMarker(m.Text.ToUpperInvariant())).Distinct().ToArray()
         });
     }
 }
예제 #2
0
 public void UpdateConfig(Configuration config)
 {
     config.UserSettings.ToDoListSettings.ToDoMarkers = TodoSettings.Select(m => new ToDoMarker(m.Text.ToUpperInvariant())).Distinct().ToArray();
 }