Exemple #1
0
        public static void SaveConverterEngine(string fileName, PinglishMapping pinglishMapping)
        {
            Stream file = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
            var    bf   = new BinaryFormatter();

            bf.Serialize(file, pinglishMapping);

            file.Close();
        }
 /// <summary>
 /// Saves the converter engine to the given file.
 /// </summary>
 /// <param name="fileName">Name of the file.</param>
 public void SaveConverter(string fileName)
 {
     PinglishMapping.SaveConverterEngine(fileName, m_converter);
 }
 /// <summary>
 /// Loads the converter engine from the given file.
 /// </summary>
 /// <param name="fileName">Name of the file.</param>
 public void LoadConverter(string fileName)
 {
     m_converter = PinglishMapping.LoadConverterEngine(fileName);
 }