Beispiel #1
0
        /// <summary>
        /// Handles the Click event of the <see cref="loadPEToolStripMenuItem"/> control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void loadPEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var uiFrm = new ParticleEffectUITypeEditorForm(null))
            {
                var result = uiFrm.ShowDialog(this);
                if (result != DialogResult.OK && result != DialogResult.Yes)
                {
                    return;
                }

                var effect = uiFrm.SelectedItem;
                if (effect == null)
                {
                    return;
                }

                var editorFrm = new ParticleEditorForm();
                editorFrm.ParticleEffect = effect;
                editorFrm.Show(dockPanel, DockState.Float);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Handles the Click event of the <see cref="newPEToolStripMenuItem"/> control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void newPEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            const string confirmMsg = "Are you sure you wish to create a new particle effect?";

            if (MessageBox.Show(confirmMsg, "Create new particle effect?", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }

            // Create the new ParticleEffect
            var pe = new ParticleEffect();

            // Save the new ParticleEffect
            ParticleEffectManager.Instance.Save(ContentPaths.Dev);

            // Show the editor form
            var editorFrm = new ParticleEditorForm {
                ParticleEffect = pe
            };

            editorFrm.Show(dockPanel, DockState.Float);
        }
Beispiel #3
0
        /// <summary>
        /// Handles the Click event of the <see cref="newPEToolStripMenuItem"/> control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void newPEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            const string confirmMsg = "Are you sure you wish to create a new particle effect?";
            if (MessageBox.Show(confirmMsg, "Create new particle effect?", MessageBoxButtons.YesNo) == DialogResult.No)
                return;

            // Create the new ParticleEffect
            var pe = new ParticleEffect();

            // Save the new ParticleEffect
            ParticleEffectManager.Instance.Save(ContentPaths.Dev);

            // Show the editor form
            var editorFrm = new ParticleEditorForm { ParticleEffect = pe };
            editorFrm.Show(dockPanel, DockState.Float);
        }
Beispiel #4
0
        /// <summary>
        /// Handles the Click event of the <see cref="loadPEToolStripMenuItem"/> control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void loadPEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var uiFrm = new ParticleEffectUITypeEditorForm(null))
            {
                var result = uiFrm.ShowDialog(this);
                if (result != DialogResult.OK && result != DialogResult.Yes)
                    return;

                var effect = uiFrm.SelectedItem;
                if (effect == null)
                    return;

                var editorFrm = new ParticleEditorForm();
                editorFrm.ParticleEffect = effect;
                editorFrm.Show(dockPanel, DockState.Float);
            }
        }