Exemplo n.º 1
0
        public void addFile(PatientDataFile file)
        {
            fileDataGrid.addItem(file.FirstName, file);
            uint newIndex = fileDataGrid.getItemCount() - 1;

            fileDataGrid.setSubItemNameAt(1, newIndex, file.LastName);
            fileDataGrid.setSubItemNameAt(2, newIndex, file.DateModified.ToString());
        }
 private void savePresets()
 {
     try
     {
         RenderPresetCollection container = new RenderPresetCollection();
         uint count = presets.getItemCount();
         for (uint i = 0; i < count; ++i)
         {
             container.AddLast((RenderPreset)presets.getItemDataAt(i));
         }
         using (XmlTextWriter xmlWriter = new XmlTextWriter(RenderPresetsFile, Encoding.Unicode))
         {
             xmlWriter.Formatting = Formatting.Indented;
             xmlSaver.saveObject(container, xmlWriter);
         }
     }
     catch (Exception ex)
     {
         Logging.Log.Error("{0} saving presets. Reason: {1}", ex.GetType().Name, ex.Message);
     }
 }