public override void Save() { if (FilePath.Equals("")) { SaveAs(); return; } FileOutput o = new FileOutput(); mta.Compile(new List <string>(richTextBox1.Text.Split('\n'))); byte[] n = mta.Rebuild(); o.WriteBytes(n); o.Save(FilePath); Edited = false; }
private void loadViewportButton_Click(object sender, EventArgs e) { // Compile the MTA just in case and load into the active viewport. mta = new MTA(); mta.Compile(new List <string>(richTextBox1.Text.Split('\n'))); ModelViewport modelViewport = (ModelViewport)MainForm.Instance.GetActiveModelViewport(); if (modelViewport != null) { modelViewport.CurrentMaterialAnimation = mta; } }