Ejemplo n.º 1
0
        public static void SaveSettings(string demoName, DicomDemoSettings settings)
        {
            try
            {
                string        filename = GetSettingsFilename(demoName);
                XmlSerializer xs       = new XmlSerializer(typeof(DicomDemoSettings));

                using (TextWriter xmlTextWriter = new StreamWriter(filename))
                {
                    xs.Serialize(xmlTextWriter, settings);
                    xmlTextWriter.Close();
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
      public static void SaveSettings ( string demoName, DicomDemoSettings settings )
      {
         try
         {
            string filename = GetSettingsFilename(demoName);
            XmlSerializer xs = new XmlSerializer(typeof(DicomDemoSettings));

            using (TextWriter xmlTextWriter = new StreamWriter(filename))
            {
                xs.Serialize(xmlTextWriter, settings);
                xmlTextWriter.Close();
            }
         }
         catch (Exception)
         {
            throw;
         }
      }