Exemplo n.º 1
0
        public override void SaveAs(string fileName)
        {
            string ext = Path.GetExtension(fileName).ToLower();

            if (ext != ".hxproj")
            {
                return;
            }

            if (!AllowedSaving(fileName))
            {
                return;
            }
            try
            {
                HaxeProjectWriter writer = new HaxeProjectWriter(this, fileName);
                writer.WriteProject();
                writer.Flush();
                writer.Close();
                if (saveHXML && OutputType != OutputType.CustomBuild)
                {
                    StreamWriter hxml = File.CreateText(Path.ChangeExtension(fileName, "hxml"));
                    foreach (string e in BuildHXML(new string[0], this.OutputPath, true))
                    {
                        hxml.WriteLine(e);
                    }
                    hxml.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "IO Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
 public override void SaveAs(string fileName)
 {
     try
     {
         HaxeProjectWriter writer = new HaxeProjectWriter(this, fileName);
         writer.WriteProject();
         writer.Flush();
         writer.Close();
         if (saveHXML)
         {
             StreamWriter hxml = File.CreateText(Path.ChangeExtension(fileName, "hxml"));
             foreach (string e in BuildHXML(new string[0], this.OutputPath, true))
             {
                 hxml.WriteLine(e);
             }
             hxml.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "IO Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 3
0
        public override void SaveAs(string fileName)
        {
            string ext = Path.GetExtension(fileName).ToLower();
            if (ext != ".hxproj") return;

            if (!AllowedSaving(fileName)) return;
            try
            {
                HaxeProjectWriter writer = new HaxeProjectWriter(this, fileName);
                writer.WriteProject();
                writer.Flush();
                writer.Close();
                if (saveHXML && OutputType != OutputType.CustomBuild) {
                    StreamWriter hxml = File.CreateText(Path.ChangeExtension(fileName, "hxml"));
                    foreach( string e in BuildHXML(new string[0],this.OutputPath,true) )
                        hxml.WriteLine(e);
                    hxml.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "IO Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 4
0
 public override void SaveAs(string fileName)
 {
     try
     {
         HaxeProjectWriter writer = new HaxeProjectWriter(this, fileName);
         writer.WriteProject();
         writer.Flush();
         writer.Close();
         if (saveHXML) {
             StreamWriter hxml = File.CreateText(Path.ChangeExtension(fileName, "hxml"));
             foreach( string e in BuildHXML(new string[0],this.OutputPath,true) )
                 hxml.WriteLine(e);
             hxml.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "IO Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }