示例#1
0
        public override void Save()
        {
            if (FilePath.Equals(""))
            {
                SaveAs();
                return;
            }
            FileOutput fileOutput = new FileOutput();

            byte[] n = currentNut.Rebuild();

            fileOutput.writeBytes(n);
            fileOutput.save(FilePath);
            Edited = false;
        }
示例#2
0
        public override void Save()
        {
            if (FilePath.Equals(""))
            {
                SaveAs();
                return;
            }
            PromptUserToConfirmMipRegenIfGtx(currentNut);

            FileOutput fileOutput = new FileOutput();

            byte[] n = currentNut.Rebuild();

            fileOutput.writeBytes(n);
            fileOutput.save(FilePath);
            Edited = false;
        }
示例#3
0
        public override void Save()
        {
            if (FilePath.Equals(""))
            {
                SaveAs();
                return;
            }
            FileOutput fileOutput = new FileOutput();

            byte[] n = NUT.Rebuild();
            //Temporarily disabling this prompt until zlib works properly

            /*DialogResult dialogResult = MessageBox.Show("Would you like to compress this NUT file with zlib?\nIf you are unsure, select \"No\".", "zlib Compression", MessageBoxButtons.YesNo);
             * if (dialogResult == DialogResult.Yes)
             *  n = FileData.DeflateZLIB(n);*/
            fileOutput.writeBytes(n);
            fileOutput.save(FilePath);
            Edited = false;
        }
示例#4
0
        public override void Save()
        {
            if (FilePath.Equals(""))
            {
                SaveAs();
                return;
            }
            FileOutput o = new FileOutput();

            byte[]       n            = NUT.Rebuild();
            DialogResult dialogResult = MessageBox.Show("Would you like to compress this NUT file with zlib?\nIf you are unsure, select \"No\".", "zlib Compression", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                n = FileData.DeflateZLIB(n);
            }
            o.writeBytes(n);
            o.save(FilePath);
            Edited = false;
        }
示例#5
0
        private void saveNUTZLIBToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var sfd = new SaveFileDialog())
            {
                sfd.Filter = "Namco Universal Texture (.nut)|*.nut|" +
                             "All Files (*.*)|*.*";

                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    if (sfd.FileName.EndsWith(".nut") && selected != null)
                    {
                        FileOutput o = new FileOutput();
                        o.writeBytes(FileData.DeflateZLIB(selected.Rebuild()));
                        o.save(sfd.FileName);
                    }
                }
            }
        }