Exemplo n.º 1
0
        /// <summary>
        /// Saves a project after editing.
        /// </summary>
        public void Save()
        {
            PBXDictionary result = new PBXDictionary();

            result.Add("archiveVersion", 1);
            result.Add("classes", new PBXDictionary());
            result.Add("objectVersion", 45);

            Consolidate();
            result.Add("objects", _objects);

            result.Add("rootObject", _rootObjectKey);

            Backup();

            // Parse result object directly into file
            PBXParser    parser   = new PBXParser();
            StreamWriter saveFile = File.CreateText(System.IO.Path.Combine(this.filePath, "project.pbxproj"));

            saveFile.Write(parser.Encode(result, false));
            saveFile.Close();

//			Xcode4Controller.Connect();
//			Xcode4Controller.OpenProject(filePath);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Saves a project after editing.
        /// </summary>
        public void Save()
        {
            PBXDictionary result = new PBXDictionary();

            result.Add("archiveVersion", 1);
            result.Add("classes", new PBXDictionary());
            result.Add("objectVersion", 45);

            Consolidate();
            result.Add("objects", _objects);

            result.Add("rootObject", _rootObjectKey);

            Backup();

            // Parse result object directly into file
            PBXParser parser = new PBXParser();
            string    ret    = parser.Encode(result, false);

            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(ret);
            string path  = System.IO.Path.Combine(this.filePath, "project.pbxproj");

            if (File.Exists(path))
            {
                File.Delete(path);
            }
            FileStream saveFile = File.Open(path, FileMode.CreateNew, FileAccess.Write);

            //StreamWriter saveFile = File.CreateText( System.IO.Path.Combine( this.filePath, "project.pbxproj" ) );
            saveFile.Write(bytes, 0, bytes.Length);
            saveFile.Close();
            saveFile.Dispose();
        }
Exemplo n.º 3
0
		private void CreateNewProject(PBXDictionary result, string path) 
		{
			PBXParser parser = new PBXParser();
			StreamWriter saveFile = File.CreateText( path );
			saveFile.Write( parser.Encode( result, true ) );
			saveFile.Close();
		}
Exemplo n.º 4
0
        /// <summary>
        /// Saves a project after editing.
        /// </summary>
        public void Save()
        {
            PBXDictionary result = new PBXDictionary();

            result.internalNewlines = true;
            result.Add("archiveVersion", 1);
            result.Add("classes", new PBXDictionary());
            result.Add("objectVersion", 46);

            Consolidate();
            result.Add("objects", _objects);

            result.Add("rootObject", _rootObjectKey);

            Backup();

            PBXParser    parser   = new PBXParser();
            StreamWriter saveFile = File.CreateText(System.IO.Path.Combine(this.filePath, "project.pbxproj"));

            saveFile.Write(parser.Encode(result));
            saveFile.Close();
        }
Exemplo n.º 5
0
 private void CreateNewProject(PBXDictionary result, string path)
 {
     PBXParser parser = new PBXParser();
     StreamWriter saveFile = File.CreateText( path );
     saveFile.Write( parser.Encode( result, true ) );
     saveFile.Close();
 }
		/// <summary>
		/// Saves a project after editing.
		/// </summary>
		public void Save()
		{
			PBXDictionary result = new PBXDictionary();
			result.internalNewlines = true;
			result.Add( "archiveVersion", 1 );
			result.Add( "classes", new PBXDictionary() );
			result.Add( "objectVersion", 46 );
			
			Consolidate();
			result.Add( "objects", _objects );
			
			result.Add( "rootObject", _rootObjectKey );
			
			Backup();
			
			PBXParser parser = new PBXParser();
			StreamWriter saveFile = File.CreateText( System.IO.Path.Combine( this.filePath, "project.pbxproj" ) );
			saveFile.Write( parser.Encode( result ) );
			saveFile.Close();
		}
Exemplo n.º 7
0
        /// <summary>
        /// Saves a project after editing.
        /// </summary>
        public void Save()
        {
            PBXDictionary result = new PBXDictionary();
            result.Add( "archiveVersion", 1 );
            result.Add( "classes", new PBXDictionary() );
            result.Add( "objectVersion", 45 );

            Consolidate();
            result.Add( "objects", _objects );

            result.Add( "rootObject", _rootObjectKey );

            Backup();

            // Parse result object directly into file
            PBXParser parser = new PBXParser();
            StreamWriter saveFile = File.CreateText( System.IO.Path.Combine( this.filePath, "project.pbxproj" ) );
            saveFile.Write( parser.Encode( result, false ) );
            saveFile.Close();

            //			Xcode4Controller.Connect();
            //			Xcode4Controller.OpenProject(filePath);
        }