Example #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);
     }
 }
Example #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);
            }
        }
Example #3
0
 public NFODocument(NFOInfo nfoInfo, NFOStyle nfoStyle)
 {
     this.nfoInfo  = nfoInfo;
     this.nfoStyle = nfoStyle;
 }
Example #4
0
 public NFOTemplate(NFOInfo nfoInfo, NFOStyle nfoStyle)
 {
     this.nfoInfo  = nfoInfo;
     this.nfoStyle = nfoStyle;
 }