コード例 #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;
            }
        }
コード例 #2
0
ファイル: Utils.cs プロジェクト: khaha2210/radio
      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;
         }
      }