Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
            }
        }