コード例 #1
0
 /// <summary>
 /// Save a template to a file
 /// </summary>
 /// <param name="filename">the name of the template file</param>
 /// <param name="style">the instance to be saved</param>
 public static void ExportTemplate(string filename, NFOStyle style)
 {
     try
     {
         SerializationUtil.BinarySerialize(filename, style);
     }
     catch (Exception e)
     {
         throw new Exception("[Export Template Error]: Error when saving template ' " + filename + " '", e);
     }
 }
コード例 #2
0
        /// <summary>
        /// Load a template from a file
        /// </summary>
        /// <param name="filename">the name of the template file</param>
        /// <returns>loaded instance</returns>
        public static NFOStyle ImportTemplate(string filename)
        {
            NFOStyle ns = null;

            try
            {
                ns = (NFOStyle)SerializationUtil.BinaryDerialize(filename);
                return(ns);
            }
            catch (Exception e)
            {
                throw new Exception("[Import Template Error]: Error when loading template ' " + filename + " '", e);
            }
        }
コード例 #3
0
ファイル: NFODocument.cs プロジェクト: zhiiker/NFOGenerator
 public NFODocument(NFOInfo nfoInfo, NFOStyle nfoStyle)
 {
     this.nfoInfo  = nfoInfo;
     this.nfoStyle = nfoStyle;
 }
コード例 #4
0
ファイル: NFOTemplate.cs プロジェクト: zhiiker/NFOGenerator
 public NFOTemplate(NFOInfo nfoInfo, NFOStyle nfoStyle)
 {
     this.nfoInfo  = nfoInfo;
     this.nfoStyle = nfoStyle;
 }