Ejemplo n.º 1
0
        /// <summary>
        /// Create a new project file and object
        /// </summary>
        /// <param name="file">Path to the project file</param>
        /// <returns>Read to use Project object</returns>
        private static BlamLib.CheApe.Project Create(string file)
        {
            BlamLib.CheApe.Project proj = new BlamLib.CheApe.Project(BlamVersion.Halo2, file);
            Managers.FileManager   fm   = new Managers.FileManager(file);
            fm.CreateForWrite();
            fm.Manage(proj);
            fm.Write();
            fm.Close();

            return(new ProjectState(proj).Project);
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Create a new project file and object
		/// </summary>
		/// <param name="file">Path to the project file</param>
		/// <returns>Read to use Project object</returns>
		private static BlamLib.CheApe.Project Create(string file)
		{
			BlamLib.CheApe.Project proj = new BlamLib.CheApe.Project(BlamVersion.Halo2, file);
			Managers.FileManager fm = new Managers.FileManager(file);
			fm.CreateForWrite();
			fm.Manage(proj);
			fm.Write();
			fm.Close();

			return new ProjectState(proj).Project;
		}
Ejemplo n.º 3
0
        /// <summary>
        /// Save an existing project
        /// </summary>
        /// <param name="save_as">If not null, then it saves the project to this file and updates the project settings</param>
        /// <param name="proj">Project object in question</param>
        private static void Save(string save_as, BlamLib.CheApe.Project proj)
        {
            Managers.FileManager fm;

            if (save_as == null)
            {
                fm = new Managers.FileManager(proj.FileName);
                fm.OpenForWrite();
            }
            else
            {
                fm = new Managers.FileManager(proj.FileName = save_as);
                fm.CreateForWrite();
            }

            fm.Manage(proj);
            fm.Write();
            fm.Close();
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Save an existing project
		/// </summary>
		/// <param name="save_as">If not null, then it saves the project to this file and updates the project settings</param>
		/// <param name="proj">Project object in question</param>
		private static void Save(string save_as, BlamLib.CheApe.Project proj)
		{
			Managers.FileManager fm;

			if (save_as == null)
			{
				fm = new Managers.FileManager(proj.FileName);
				fm.OpenForWrite();
			}
			else
			{
				fm = new Managers.FileManager(proj.FileName = save_as);
				fm.CreateForWrite();
			}

			fm.Manage(proj);
			fm.Write();
			fm.Close();
		}