private void btnNewPackage_Click(object sender, EventArgs e)
 {
     // safety check - should not happen
     if (_model != null)
     {
         var f = new frmNewPackage(_model);
         f.ShowDialog();
     }
 }
        private void btnNewPackage_Click(object sender, EventArgs e)
        {
            // safety check - should not happen
            if (_model != null)
            {
                IInstallationStep step;

                using (var f = new frmNewPackage())
                {
                    var res = f.ShowDialog();
                    if (res == DialogResult.OK)
                    {
                        step = f.CurrentInstallationStep;
                        _model.Add(step);

                        if (UserSettings.Default.UIOpenEditorOnAdd)
                        {
                            Program.ShowPackageEditor(step);
                        }
                    }
                }
            }
        }