private void checkCredentialsOnWeb() { if (sign_id.Text.Equals("") | !Information.IsNumeric(sign_id.Text)) { return; } mainform.forwardPicBtn.Visible = false; mainform.backPicBtn.Visible = false; translations = new languageTranslations(mainform.enVars); translations.load("busyDialog"); var vars = new Dictionary <string, string>(); vars.Add("task", "101"); vars.Add("id", sign_id.Text.ToString().Replace(" ", "")); vars.Add("idkey", signInCode.Text.ToString().Replace(" ", "")); vars.Add("type", "unknown"); // install default secret key mainform.enVars.secretKey = mainform.defaultEncryptionKey; mainform.enVars.currentLang = mainform.settings.lang; checkCredentialsHttp = new HttpDataPostData(mainform.enVars, mainform.settings.serverWebAddr + mainform.settings.ApiServerAddrPath); checkCredentialsHttp.loadQueue(vars); checkCredentialsHttp.startRequest(); }
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); server_web_addr_lbl.Text = translations.getText("serverWebAddr"); server_ftp_addr_lbl.Text = translations.getText("serverFtpAddr"); server_ftp_port_lbl.Text = translations.getText("serverFtpPort"); connectionType_lbl.Text = translations.getText("ftpConncetionTypeTitle"); username_lbl.Text = translations.getText("ftpUsername"); password_lbl.Text = translations.getText("ftpPassword"); connectionType.Items.Clear(); connectionType.Items.Add(translations.getText("ftpConnTypeOverTls")); connectionType.Items.Add(translations.getText("ftpConnTypePlain")); connectionType.SelectedIndex = 0; if (!Information.IsNothing(mainform.settings.serverWebAddr)) { server_web_addr.Text = mainform.settings.serverWebAddr; } if (!Information.IsNothing(mainform.settings.serverFtpAddr)) { server_ftp_addr.Text = mainform.settings.serverFtpAddr; } ResumeLayout(); } }
public void googleFreeTranslation() { // https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl={langtotranslate}&hl={originlang}&dt=t&dt=bd&dj=1&source=icon&q={text} translations = new languageTranslations(stateCore); if (langToTranslate.Equals("")) { langToTranslate = stateCore.defaultTranslatedLang; } if (originLang.Equals("")) { originLang = stateCore.currentLang; } translated = ""; string str = originalTextToTranslate; int idx = str.IndexOf(Environment.NewLine + " _________________________" + Environment.NewLine); if (idx > 0) { str = str.Substring(0, idx); } // these chars are allowed !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ str = str.Replace(Environment.NewLine, "#$%@# ").Replace(".", "#$%@# "); string url = stateCore.addons("translation")("url").Replace("{langtotranslate}", langToTranslate).Replace("{originlang}", originLang).Replace("{text}", Uri.EscapeDataString(str)).Replace("{key}", stateCore.addons("translation")("key")); HttpDataRequestGoogleFree = new HttpDataGetData(stateCore, url); HttpDataRequestGoogleFree.initialize(); HttpDataRequestGoogleFree.loadQueue(default, default, default);
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); if (IsValidUrl("http|https", mainform.settings.serverWebAddr).Equals(true)) { selectionOkpic.Visible = false; } else { selectionOkpic.Visible = true; } server_web_addr_lbl.Text = translations.getText("serverWebAddr"); if (!Information.IsNothing(mainform.settings.serverWebAddr)) { server_web_addr.Text = mainform.settings.serverWebAddr; } ResumeLayout(); } }
private void setupWizard_1_Load(object sender, EventArgs e) { btnContinueTxt.Font = new Font(mainform.enVars.fontTitle.Families(0), 9, FontStyle.Regular); SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); btnContinueTxt.Text = translations.getText("startApp"); ResumeLayout(); }
private void setupWizard_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); progress_status_text.Text = translations.getText("settingUp") + " ..."; ResumeLayout(); mainform.enVars.currentLang = mainform.settings.lang; } }
private void setupWizard_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); db_name_lbl.Text = translations.getText("dbName"); db_user_lbl.Text = translations.getText("dbUser"); db_pwd_lbl.Text = translations.getText("dbPwd"); ResumeLayout(); } }
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); full_name_lbl.Text = translations.getText("AdminFullName"); id_lbl.Text = translations.getText("AdminId"); id_verify_lbl.Text = translations.getText("AdminIdVerify"); ResumeLayout(); } }
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); enableTranslation.Text = translations.getText("AddonsSelectTranslations"); translation_provider_lbl.Text = translations.getText("AddonsProvider"); translation_apikey_lbl.Text = translations.getText("AddonsApiKey"); enableWeather.Text = translations.getText("AddonsSelectWeather"); weather_provider_lbl.Text = translations.getText("AddonsProvider"); weather_apikey_lbl.Text = translations.getText("AddonsApiKey"); ResumeLayout(); } }
private void meteo_frm_Load(object sender, EventArgs e) { translations = new languageTranslations(stateCore); SuspendLayout(); select_location_lbl.Font = new Font(stateCore.fontTitle.Families(0), stateCore.RegularTextFontSize, FontStyle.Bold); city_txt.Font = new Font(stateCore.fontText.Families(0), stateCore.RegularTextFontSize, FontStyle.Regular); meteo_txt.Font = new Font(stateCore.fontText.Families(0), stateCore.RegularTextFontSize, FontStyle.Regular); descricao_txt.Font = new Font(stateCore.fontText.Families(0), stateCore.RegularTextFontSize, FontStyle.Regular); site_combo.Font = new Font(stateCore.fontText.Families(0), stateCore.RegularTextFontSize, FontStyle.Regular); translations.load("commonForm"); translations.load("busyMessages"); meteo_txt.Text = translations.getText("commServer"); translations.load("meteorology"); select_location_lbl.Text = translations.getText("location"); city_txt.Text = ""; descricao_txt.Text = ""; }
private void meteo_frm_Load(object sender, EventArgs e) { state = mainForm.state; translations = new languageTranslations(state); SuspendLayout(); closeBtn.BackColor = state.buttonColor; StartBtn.BackColor = state.buttonColor; closeBtn.Font = new Font(state.fontText.Families(0), state.RegularTextFontSize, FontStyle.Regular); StartBtn.Font = new Font(state.fontText.Families(0), state.RegularTextFontSize, FontStyle.Regular); translations.load("commonForm"); closeBtn.Text = translations.getText("closeBtn"); translations.load("smartcard"); StartBtn.Text = translations.getText("newCard"); readCodeOnly.Text = translations.getText("readCodeOnly"); cardIdCode.Text = translations.getText("cardId") + ": - -"; authCode_lbl.Text = translations.getText("authCode") + ": - -"; ResumeLayout(); }
private void setupWizard_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); sign_in_lbl.Text = translations.getText("signIn"); forgot_id.Text = translations.getText("forgotId") + " ?"; email_lbl.Text = translations.getText("email"); send.Text = translations.getText("send"); signInCode_lbl.Text = translations.getText("code"); ResumeLayout(); mainform.enVars.currentLang = mainform.settings.lang; showpass = true; authByCard = false; server_msg.Visible = false; mainform.forwardPicBtn.Visible = false; try { nfCard = (IsmartCard)loadDllObject(mainform.enVars, "contactless.smartcards.dll", "smartCard"); } catch (Exception ex) { nfCard = null; } if (nfCard is object) { if (nfCard.SelectDevice()) { var smartCardReaders = new List <string>(); string errMsg = ""; if (nfCard.GetAvailableReaders(smartCardReaders, errMsg)) { authByCard = true; server_msg.Visible = true; doCardAuth(); } } } } }
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(stateCore); translations.load("setupWizard"); if (mainform.settings.lang is null) { selectionOkpic.Visible = false; } else { selectionOkpic.Visible = true; } show_all_lang.Text = translations.getText("showAll"); defaultLanguage.Text = translations.getText("chooseDefaultLanguage"); ResumeLayout(); } }
private void setupWizard_1_shown(object sender, EventArgs e) { translations = new languageTranslations(mainform.enVars); if (mainform.settings.isSharedServer) { if (mainform.settings.isNewServer) // shared new { SaveSettingsSharedNew(); } else // shared existing { SaveSettingsSharedExisting(); } } else if (mainform.settings.isNewServer) // own new { SaveSettingsOwnNew(); } else // own existing { SaveSettingsOwnExisting(); } }
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); send.Text = translations.getText("sendDiagnostics"); share.Text = translations.getText("shareCrashData"); share_details.Text = translations.getText("crashDataDescription"); send_details.Text = translations.getText("diagnosticsDescritpion"); ResumeLayout(); if (!Information.IsNothing(mainform.settings.sendDiags)) { if (mainform.settings.sendDiags) { send.Checked = true; } else { send.Checked = false; } } if (!Information.IsNothing(mainform.settings.sendCrash)) { if (mainform.settings.sendCrash) { share.Checked = true; } else { share.Checked = false; } } } }
private void setupWizard_1_VisibleChanged(object sender, EventArgs e) { if (Visible) { SuspendLayout(); translations = new languageTranslations(mainform.enVars); translations.load("setupWizard"); sharedBtn.Text = translations.getText("sharedPlatform"); ownBtn.Text = translations.getText("ownPlatform"); sharedSetupNew.Text = translations.getText("setupNewPlatform"); SharedConnectExisting.Text = translations.getText("connectExistingPlatform"); ownSetupNew.Text = translations.getText("setupNewPlatform"); ownConnectExisting.Text = translations.getText("connectExistingPlatform"); if (!Information.IsNothing(mainform.settings.isSharedServer)) { if (!Information.IsNothing(mainform.settings.isNewServer)) { if (mainform.settings.isSharedServer) { sharedBtn.Checked = true; ownBtn.Checked = false; if (!Information.IsNothing(mainform.settings.disableOptions)) { if (mainform.settings.disableOptions.Equals(true)) { ownBtn.Enabled = false; sharedBtn.Enabled = false; } } if (mainform.settings.isNewServer) { sharedSetupNew.Checked = true; SharedConnectExisting.Checked = false; ownSetupNew.Checked = false; ownConnectExisting.Checked = false; if (!Information.IsNothing(mainform.settings.disableOptions)) { if (mainform.settings.disableOptions.Equals(true)) { SharedConnectExisting.Enabled = false; ownSetupNew.Enabled = false; ownConnectExisting.Enabled = false; } } } else { sharedSetupNew.Checked = false; SharedConnectExisting.Checked = true; ownSetupNew.Checked = false; ownConnectExisting.Checked = false; if (!Information.IsNothing(mainform.settings.disableOptions)) { if (mainform.settings.disableOptions.Equals(true)) { sharedSetupNew.Enabled = false; ownConnectExisting.Enabled = false; ownSetupNew.Enabled = false; } } } } else { sharedBtn.Checked = false; ownBtn.Checked = true; if (!Information.IsNothing(mainform.settings.disableOptions)) { if (mainform.settings.disableOptions.Equals(true)) { sharedBtn.Enabled = false; ownBtn.Enabled = false; } } if (mainform.settings.isNewServer) { sharedSetupNew.Checked = false; SharedConnectExisting.Checked = false; ownSetupNew.Checked = true; ownConnectExisting.Checked = false; if (!Information.IsNothing(mainform.settings.disableOptions)) { if (mainform.settings.disableOptions.Equals(true)) { SharedConnectExisting.Enabled = false; sharedSetupNew.Enabled = false; ownConnectExisting.Enabled = false; } } } else { sharedSetupNew.Checked = false; SharedConnectExisting.Checked = false; ownSetupNew.Checked = false; ownConnectExisting.Checked = true; if (!Information.IsNothing(mainform.settings.disableOptions)) { if (mainform.settings.disableOptions.Equals(true)) { sharedSetupNew.Enabled = false; SharedConnectExisting.Enabled = false; ownSetupNew.Enabled = false; } } } } } } ResumeLayout(); } }
public setupWizardMainForm() { if (ExternalLoadEnVars is object) { enVars = ExternalLoadEnVars; } this.SuspendLayout(); InitializeComponent(); this.ResumeLayout(); this.Refresh(); translations = new languageTranslations(enVars); // for testing only loadFormsForTesting(); // loadAssembly() // 'LOAD WIZARD FORMS FORMS ============================================== if (TypesOnAssemblies is object) { setupWizard_language setupWizardLanguageForm = (setupWizard_language)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_language")) as Form); setupWizardLanguageForm.preLoadData(this); wizardForms.Add(setupWizardLanguageForm); setupWizard_country setupWizardCountryForm = (setupWizard_country)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_country")) as Form); setupWizardCountryForm.preLoadData(this); wizardForms.Add(setupWizardCountryForm); setupWizard_platformType setupWizard_platformTypeForm = (setupWizard_platformType)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_platformType")) as Form); setupWizard_platformTypeForm.preLoadData(this); wizardForms.Add(setupWizard_platformTypeForm); setupWizard_ServerAddress setupWizard_ServerAddressForm = (setupWizard_ServerAddress)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_ServerAddress")) as Form); setupWizard_ServerAddressForm.preLoadData(this); wizardForms.Add(setupWizard_ServerAddressForm); setupWizard_signIn setupWizard_signInForm = (setupWizard_signIn)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_signIn")) as Form); setupWizard_signInForm.preLoadData(this); wizardForms.Add(setupWizard_signInForm); setupWizard_NewFtpWebSettings setupWizard_NewFtpWebSettingsForm = (setupWizard_NewFtpWebSettings)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_NewFtpWebSettings")) as Form); setupWizard_NewFtpWebSettingsForm.preLoadData(this); wizardForms.Add(setupWizard_NewFtpWebSettingsForm); setupWizard_createDB setupWizard_createDBForm = (setupWizard_createDB)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_createDB")) as Form); setupWizard_createDBForm.preLoadData(this); wizardForms.Add(setupWizard_createDBForm); setupWizard_addOns setupWizard_addOnsForm = (setupWizard_addOns)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_addOns")) as Form); setupWizard_addOnsForm.preLoadData(this); wizardForms.Add(setupWizard_addOnsForm); setupWizard_createAdminAccount setupWizard_createAdminAccountForm = (setupWizard_createAdminAccount)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_createAdminAccount")) as Form); setupWizard_createAdminAccountForm.preLoadData(this); wizardForms.Add(setupWizard_createAdminAccountForm); setupWizard_DiagnosticsCrashData setupWizard_DiagnosticsCrashDataForm = (setupWizard_DiagnosticsCrashData)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_DiagnosticsCrashData")) as Form); setupWizard_DiagnosticsCrashDataForm.preLoadData(this); wizardForms.Add(setupWizard_DiagnosticsCrashDataForm); setupWizard_settingUp setupWizard_settingUpForm = (setupWizard_settingUp)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_settingUp")) as Form); setupWizard_settingUpForm.preLoadData(this); wizardForms.Add(setupWizard_settingUpForm); setupWizard_finnish setupWizard_finnishForm = (setupWizard_finnish)(Activator.CreateInstance(TypesOnAssemblies.GetType("ConstructionSiteLogistics.Setup.Gui.setupWizard_finnish")) as Form); setupWizard_finnishForm.preLoadData(this); wizardForms.Add(setupWizard_finnishForm); } else { loadFormsForTesting(); } loadTitlesAndSubTitles(); _AlphaGradientPanel1.Name = "AlphaGradientPanel1"; _Panel1.Name = "Panel1"; _forwardPicBtn.Name = "forwardPicBtn"; _Panel2.Name = "Panel2"; _backPicBtn.Name = "backPicBtn"; _PanelMain.Name = "PanelMain"; _PanelBottom.Name = "PanelBottom"; _PanelTop.Name = "PanelTop"; _title.Name = "title"; _subtitle.Name = "subtitle"; }