private void NewLocale() { var dialog = new NewLocaleDialog(); dialog.ShowDialog(); if (dialog.Result == DialogResult.Cancel) { return; } var newLocale = new Locale(dialog.LocaleKey); newLocale.ParentLocale = _localeManager.DefaultLocale; newLocale.Name = dialog.LocaleName; var newFolder = Path.Combine(_folder, dialog.LocaleKey); if (!Directory.Exists(newFolder)) { Directory.CreateDirectory(newFolder); } newLocale.Save(Path.Combine(newFolder, _localeManager.PropertiesXml)); ChangeLocale(newLocale); }
private void NewLocale() { var dialog = new NewLocaleDialog(); dialog.ShowDialog(); if (dialog.Result == DialogResult.Cancel) return; var newLocale = new Locale(dialog.LocaleKey); newLocale.ParentLocale = _localeManager.DefaultLocale; newLocale.Name = dialog.LocaleName; var newFolder = Path.Combine(_folder, dialog.LocaleKey); if (!Directory.Exists(newFolder)) Directory.CreateDirectory(newFolder); newLocale.Save(Path.Combine(newFolder, _localeManager.PropertiesXml)); ChangeLocale(newLocale); }