Beispiel #1
0
        public void Write(KBF kbf)
        {
            FileStream stream = new FileStream(kbf.FullFileName, FileMode.Open, FileAccess.Write);

            kbf.Write(stream);
            stream.Close();
        }
Beispiel #2
0
        private void mnuNew_Click(object sender, EventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter = "K&K Binary Resource File|*.kbf";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                var stream = new FileStream(dialog.FileName, FileMode.OpenOrCreate, FileAccess.Write);
                currentFile = new KBF(stream.Name);
                currentFile.Write(stream);
                stream.Close();

                Text = originalText + " - " + dialog.FileName;

                mnuImportMesh.Enabled           = true;
                mnuImportMaterialScript.Enabled = true;
                mnuImportTexture.Enabled        = true;
                mnuSaveFile.Enabled             = true;
            }
        }