public void Show(string title, string message, Dictionary <string, string> substitutions = null) { gameObject.SetActive(true); m_PopupTitle.text = LocaleManager.GetText(title); m_PopupMessage.text = LocaleManager.GetText(message, substitutions); foreach (var comp in m_ComponentsToDisable) { comp.enabled = false; } }
public frmMain() { InitializeComponent(); //this.PrepareView(); _lM = new LocaleManager(() => Settings.UserOnes.UiLanguage, Path.Combine(Application.StartupPath, "AuditorLicenser.i18n.xml")) { FormIfOmited = this }; _model = new LicenserModel(_lM); Text += " - " + Application.ProductVersion; _model.SetLogger(this); ApplyLocalization(); Settings.UserOnesChanged += (s, e) => ApplyLocalization(); fileAppPath.IsCorrectFile = name => { var isValid = File.Exists(name) && Path.GetExtension(name) == ".exe"; if (isValid) { _model.Settings.AppPath = fileAppPath.Text; MSSQLAuditorVersion.Text = _lM.GetText("AppVersion") + _model.MSSQLAuditorVersion; } return(isValid); }; txtLoadConfFileName.IsCorrectFile = delegate(string name) { try { LicSettingsLoader.LoadFromXml(name); } catch { return(false); } return(true); }; txtLangFileName.IsCorrectFile = delegate(string name) { try { new LocaleManager(null, name); } catch { return(false); } return(true); }; txtSysSettingsFileName.IsCorrectFile = delegate(string name) { try { SettingsLoader.LoadFromXml(null, name); } catch { return(false); } return(true); }; txtUserSettingsFileName.IsCorrectFile = delegate(string name) { try { SettingsLoader.LoadFromXml(name, null); } catch { return(false); } return(true); }; }
private void button1_Click(object sender, System.EventArgs e) { try { WriteToLog(_lM.GetText("InitializingConfiguration")); if (createCfgRb.Checked) { _model.CreateSettingsAndSave(txtCreateConfFileName.Text); } if (loadCfgRb.Checked) { _model.LoadSettingsFromFile(txtLoadConfFileName.Text); } UpdateTemplateFilesList(); txtDstFolder.Text = _model.Settings.DstFolder; txtNetFolder.Text = _model.Settings.NetFolder; txtNetVersion.Text = _model.Settings.NetPlatform; txtSysSettingsFileName.Text = _model.Settings.SystemSettingsFile; txtUserSettingsFileName.Text = _model.Settings.UserSettingsFile; txtLangFileName.Text = _model.Settings.LanguageFile; txtWixFileName.Text = _model.Settings.WixFileName; txtWixBanner.Text = _model.Settings.WixBannerFileName; txtWixFolder.Text = _model.Settings.WixFolder; txtSrcFolder.Text = _model.Settings.SrcFolder; txtOutputMsi.Text = _model.Settings.OutputMsi; tbDirName.Text = _model.Settings.DirectoryName; tbFileName.Text = _model.Settings.ExeFileName; tbShorcName.Text = _model.Settings.ShorcName; txtSignPriKey.Text = _model.Settings.PrivateKeySign; txtSignPubKey.Text = _model.Settings.PublicKeySign; txtEncPriKey.Text = _model.Settings.PrivateKeyDecrypt; txtEncPubKey.Text = _model.Settings.PublicKeyDecrypt; txtDnGuardFolder.Text = _model.Settings.DnGuardFolder; dnGuardExeNameTextBox.Text = _model.Settings.DnGuardExeName ?? "DNGuardCMD.exe"; chbDnGuardUse.Checked = _model.Settings.UseDnGuard; fileAppPath.Text = _model.Settings.AppPath; fileAppPath.ProcessValidate(); this.ShowAdditionalTemplates(); tbAdditionalSql.Text = _model.Settings.AdditionalSql; platformComboBox.SelectedIndex = _model.Settings.DnGuardX64Opt ? 1 : 0; dnGuardOptionsTextBox.Text = _model.Settings.DnGuardOptions ?? _model.GetDefaultDnGuardOptions(); fsLicenseFolder.Text = _model.Settings.LicenseFolder; tbLicenseFileName.Text = _model.Settings.LicenseFileName; tbProgramName.Text = _model.Settings.ProgramName; tbProgramType.Text = _model.Settings.ProgramId; WriteToLog(_lM.GetText("InitializingConfigurationComplete")); } catch (Exception ex) { WriteToLog(ex.ToString()); } }
public void Start() { gameObject.GetComponent <UnityEngine.UI.Text>().text = LocaleManager.GetText(m_ID); }