Ejemplo n.º 1
0
        private void buttonApply_Click(object sender, EventArgs e)
        {
            try
            {
                if (MessageBox.Show(
                        "Other editor forms need to be closed before the mod can be applied.\r\n" +
                        "Are you sure you want to continue?",
                        FormMain.Instance.Title,
                        MessageBoxButtons.YesNoCancel,
                        MessageBoxIcon.Exclamation) == DialogResult.Yes)
                {
                    FormMain.Instance.CloseChildren(typeof(FormModPackage));

                    myPackage.Apply();

                    FormMain.Instance.InfoMessage(
                        "Package applied successfully.");
                }
            }
            catch (Exception ex)
            {
                FormMain.Instance.ErrorMessage(ex.Message);
            }
        }