Пример #1
0
        public static LanguagePack NewPack()
        {
            NewDialog    nd  = new NewDialog();
            DialogResult res = nd.ShowDialog();

            return(nd.pack);
        }
Пример #2
0
        /// <summary>
        /// Create a new language and check for saving, etc
        /// </summary>
        public void NewLanguage()
        {
            if (packOpen && packChanges)
            {
                DialogResult res = MessageBox.Show("Would you like to save your current pack first?", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

                switch (res)
                {
                case System.Windows.Forms.DialogResult.Yes:
                    SaveLanguage();
                    break;

                case System.Windows.Forms.DialogResult.Cancel:
                    return;

                case System.Windows.Forms.DialogResult.No:
                    return;
                }
            }

            LanguagePack lp = NewDialog.NewPack();

            if (lp == null)
            {
                return;
            }

            cPack       = lp;
            packOpen    = true;
            packChanges = false;
            packPath    = "";

            UpdateUI();
        }