FRBDK/Glue/ParticleEditorPlugin/ParticleEditorPlugin/Form1.cs
/// <summary>
/// Creates a new particle list.
/// </summary>
Creates a new particle list.
Creates a new particle list .
private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ConfirmLosingChanges() == false)
            {
                return;
            }
            string path = GetSavePath();
            if (path == null)
            {
                MessageBox.Show("The particle editor requires a valid path to map particle textures. Please choose a valid path when creating a new emitter list.");
            }
            else
            {
                if (File.Exists(path) && MessageBox.Show("This file appears to already exist. Do you want to save over it?", "Confirm Overwrite", MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                FileName = path;
                EmitterSaveList newList = EmitterSaveList.FromEmitterList(new EmitterList());
                FileManager.XmlSerialize(newList, fileName);
                ProjectManager.Self.Load(fileName);
            }
        }
private void newToolStripMenuItem_Click ( object sender , EventArgs e ) { if ( ConfirmLosingChanges ( ) == false ) { return ; } string path = GetSavePath ( ) ; if ( path == null ) { MessageBox . Show ( " " ) ; } else { if ( File . Exists ( path ) && MessageBox . Show ( " " , " " , MessageBoxButtons . YesNo ) != System . Windows . Forms . DialogResult . Yes ) { return ; } FileName = path ; EmitterSaveList newList = EmitterSaveList . FromEmitterList ( new EmitterList ( ) ) ; FileManager . XmlSerialize ( newList , fileName ) ; ProjectManager . Self . Load ( fileName ) ; } }
Creates a new particle list.
Creates a new particle list .
// early out if user doesn't want to lose changes // early out if file already exists and user doesn't want to overwrite // This is a bit of a hack to create a new list // because the editor expects to load a list from a file.
sender
object
e
EventArgs