private void changeLanguageButon_Click(object sender, EventArgs e)
 {
     using (var changeLang = new languageChoice(communityName, true))
     {
         var result = changeLang.ShowDialog();
         if (result == DialogResult.OK)
         {
             MetroMessageBox.Show(this, "To apply changes you must restart the launcher", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Exemplo n.º 2
0
 private void changeLanguageButon_Click(object sender, EventArgs e)
 {
     using (var changeLang = new languageChoice(communityName, true))
     {
         var result = changeLang.ShowDialog();
         if (result == DialogResult.OK)
         {
             MetroMessageBox.Show(this, "To apply changes you must restart the launcher", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Exemplo n.º 3
0
        void loadLanguage()
        {
            try
            {
                translate.ReadToFollowing(language);
                translate.ReadToFollowing("money");
                translateDic.Add("money", translate.ReadElementContentAsString());
                translate.ReadToFollowing("reverse");
                translateDic.Add("reverse", translate.ReadElementContentAsString());
                translate.ReadToFollowing("logIn");
                translateDic.Add("logIn", translate.ReadElementContentAsString());
                translate.ReadToFollowing("logOut");
                translateDic.Add("logOut", translate.ReadElementContentAsString());
                translate.ReadToFollowing("remember");
                translateDic.Add("remember", translate.ReadElementContentAsString());
                translate.ReadToFollowing("loginMsg");
                translateDic.Add("loginMsg", translate.ReadElementContentAsString());
                translate.ReadToFollowing("registerLink");
                translateDic.Add("registerLink", translate.ReadElementContentAsString());
                translate.ReadToFollowing("commingSoon");
                translateDic.Add("commingSoon", translate.ReadElementContentAsString());
                translate.ReadToFollowing("registerMsg");
                translateDic.Add("registerMsg", translate.ReadElementContentAsString());
                translate.ReadToFollowing("username");
                translateDic.Add("username", translate.ReadElementContentAsString());
                translate.ReadToFollowing("password");
                translateDic.Add("password", translate.ReadElementContentAsString());
                translate.ReadToFollowing("passwordConfirm");
                translateDic.Add("passwordConfirm", translate.ReadElementContentAsString());
                translate.ReadToFollowing("email");
                translateDic.Add("email", translate.ReadElementContentAsString());
                translate.ReadToFollowing("cancel");
                translateDic.Add("cancel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("register");
                translateDic.Add("register", translate.ReadElementContentAsString());
                translate.ReadToFollowing("forgotPass");
                translateDic.Add("forgotPass", translate.ReadElementContentAsString());
                translate.ReadToFollowing("status");
                translateDic.Add("status", translate.ReadElementContentAsString());
                translate.ReadToFollowing("disconnectMsg");
                translateDic.Add("disconnectMsg", translate.ReadElementContentAsString());
                translate.ReadToFollowing("maintenanceTitle");
                translateDic.Add("maintenanceTitle", translate.ReadElementContentAsString());
                translate.ReadToFollowing("registerDisabled");
                translateDic.Add("registerDisabled", translate.ReadElementContentAsString());
                translate.ReadToFollowing("error404");
                translateDic.Add("error404", translate.ReadElementContentAsString());
                translate.ReadToFollowing("errorUpdate");
                translateDic.Add("errorUpdate", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateCancel");
                translateDic.Add("updateCancel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("settings");
                translateDic.Add("settings", translate.ReadElementContentAsString());
                translate.ReadToFollowing("steamUID");
                translateDic.Add("steamUID", translate.ReadElementContentAsString());
                translate.ReadToFollowing("mission");
                translateDic.Add("mission", translate.ReadElementContentAsString());
                translate.ReadToFollowing("online");
                translateDic.Add("online", translate.ReadElementContentAsString());
                translate.ReadToFollowing("offline");
                translateDic.Add("offline", translate.ReadElementContentAsString());
                translate.ReadToFollowing("notFound");
                translateDic.Add("notFound", translate.ReadElementContentAsString());
                translate.ReadToFollowing("support");
                translateDic.Add("support", translate.ReadElementContentAsString());
                translate.ReadToFollowing("taskforceVersion");
                translateDic.Add("taskforceVersion", translate.ReadElementContentAsString());
                translate.ReadToFollowing("notInstalled");
                translateDic.Add("notInstalled", translate.ReadElementContentAsString());
                translate.ReadToFollowing("installed");
                translateDic.Add("installed", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateTaskforceRequire");
                translateDic.Add("updateTaskforceRequire", translate.ReadElementContentAsString());
                translate.ReadToFollowing("forceUpdateTaskforce");
                translateDic.Add("forceUpdateTaskforce", translate.ReadElementContentAsString());
                translate.ReadToFollowing("installTaskforce");
                translateDic.Add("installTaskforce", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateTaskforce");
                translateDic.Add("updateTaskforce", translate.ReadElementContentAsString());
                translate.ReadToFollowing("play");
                translateDic.Add("play", translate.ReadElementContentAsString());
                translate.ReadToFollowing("download");
                translateDic.Add("download", translate.ReadElementContentAsString());
                translate.ReadToFollowing("update");
                translateDic.Add("update", translate.ReadElementContentAsString());
                translate.ReadToFollowing("forceUpdate");
                translateDic.Add("forceUpdate", translate.ReadElementContentAsString());
                translate.ReadToFollowing("visitSite");
                translateDic.Add("visitSite", translate.ReadElementContentAsString());
                translate.ReadToFollowing("visitTeamSpeak");
                translateDic.Add("visitTeamSpeak", translate.ReadElementContentAsString());
                translate.ReadToFollowing("modDev");
                translateDic.Add("modDev", translate.ReadElementContentAsString());
                translate.ReadToFollowing("chooseArma");
                translateDic.Add("chooseArma", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadProgress");
                translateDic.Add("downloadProgress", translate.ReadElementContentAsString());
                translate.ReadToFollowing("armaOK");
                translateDic.Add("armaOK", translate.ReadElementContentAsString());
                translate.ReadToFollowing("selectArma");
                translateDic.Add("selectArma", translate.ReadElementContentAsString());
                translate.ReadToFollowing("armaNotOK");
                translateDic.Add("armaNotOK", translate.ReadElementContentAsString());
                translate.ReadToFollowing("success");
                translateDic.Add("success", translate.ReadElementContentAsString());
                translate.ReadToFollowing("waitDownload");
                translateDic.Add("waitDownload", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateTaskforceBefore");
                translateDic.Add("updateTaskforceBefore", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadInitialisation");
                translateDic.Add("downloadInitialisation", translate.ReadElementContentAsString());
                translate.ReadToFollowing("pleaseWait");
                translateDic.Add("pleaseWait", translate.ReadElementContentAsString());
                translate.ReadToFollowing("cancelling");
                translateDic.Add("cancelling", translate.ReadElementContentAsString());
                translate.ReadToFollowing("pause");
                translateDic.Add("pause", translate.ReadElementContentAsString());
                translate.ReadToFollowing("resume");
                translateDic.Add("resume", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverRequest");
                translateDic.Add("serverRequest", translate.ReadElementContentAsString());
                translate.ReadToFollowing("listingMod");
                translateDic.Add("listingMod", translate.ReadElementContentAsString());
                translate.ReadToFollowing("listingCpp");
                translateDic.Add("listingCpp", translate.ReadElementContentAsString());
                translate.ReadToFollowing("listingAdditional");
                translateDic.Add("listingAdditional", translate.ReadElementContentAsString());
                translate.ReadToFollowing("alreadyUpToDate");
                translateDic.Add("alreadyUpToDate", translate.ReadElementContentAsString());
                translate.ReadToFollowing("inProgress");
                translateDic.Add("inProgress", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadMod");
                translateDic.Add("downloadMod", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadFile");
                translateDic.Add("downloadFile", translate.ReadElementContentAsString());
                translate.ReadToFollowing("checkMod");
                translateDic.Add("checkMod", translate.ReadElementContentAsString());
                translate.ReadToFollowing("checkCpp");
                translateDic.Add("checkCpp", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadStoped");
                translateDic.Add("downloadStoped", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadFinish");
                translateDic.Add("downloadFinish", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadWillPause");
                translateDic.Add("downloadWillPause", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadPaused");
                translateDic.Add("downloadPaused", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloaded");
                translateDic.Add("downloaded", translate.ReadElementContentAsString());
                translate.ReadToFollowing("of");
                translateDic.Add("of", translate.ReadElementContentAsString());
                translate.ReadToFollowing("estimatedTime");
                translateDic.Add("estimatedTime", translate.ReadElementContentAsString());
                translate.ReadToFollowing("waitForDownload");
                translateDic.Add("waitForDownload", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateAvailable");
                translateDic.Add("updateAvailable", translate.ReadElementContentAsString());
                translate.ReadToFollowing("errorListing");
                translateDic.Add("errorListing", translate.ReadElementContentAsString());
                translate.ReadToFollowing("taskforceInstallerMissing");
                translateDic.Add("taskforceInstallerMissing", translate.ReadElementContentAsString());
                translate.ReadToFollowing("installCancel");
                translateDic.Add("installCancel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("minutes");
                translateDic.Add("minutes", translate.ReadElementContentAsString());
                translate.ReadToFollowing("seconds");
                translateDic.Add("seconds", translate.ReadElementContentAsString());
                translate.ReadToFollowing("hours");
                translateDic.Add("hours", translate.ReadElementContentAsString());
                translate.ReadToFollowing("playersIG");
                translateDic.Add("playersIG", translate.ReadElementContentAsString());
                translate.ReadToFollowing("map");
                translateDic.Add("map", translate.ReadElementContentAsString());
                translate.ReadToFollowing("adminLevel");
                translateDic.Add("adminLevel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("copLevel");
                translateDic.Add("copLevel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("medicLevel");
                translateDic.Add("medicLevel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("cash");
                translateDic.Add("cash", translate.ReadElementContentAsString());
                translate.ReadToFollowing("bank");
                translateDic.Add("bank", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverStatus");
                translateDic.Add("serverStatus", translate.ReadElementContentAsString());
                translate.ReadToFollowing("IGinformations");
                translateDic.Add("IGinformations", translate.ReadElementContentAsString());
                translate.ReadToFollowing("usefulLink");
                translateDic.Add("usefulLink", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverMaintenance");
                translateDic.Add("serverMaintenance", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverLocked");
                translateDic.Add("serverLocked", translate.ReadElementContentAsString());

                loginButton.Text     = translateDic["logIn"];
                registerLink.Text    = translateDic["registerLink"];
                loginUsername.Hint   = translateDic["username"];
                loginPassword.Hint   = translateDic["password"];
                loginRemember.Text   = translateDic["remember"];
                newPassword.Text     = translateDic["forgotPass"];
                registerMessage.Text = translateDic["registerMsg"];
                this.Refresh();
            }
            catch
            {
                languageChoice formLanguage = new languageChoice(communityName, true);

                // Show the laguage choice
                formLanguage.ShowDialog();

                if (File.Exists(appdata + communityName + "/language.lang"))
                {
                    language = File.ReadAllText(appdata + communityName + "/language.lang");
                    loadLanguage();
                }
            }
        }
Exemplo n.º 4
0
        void loadLanguage()
        {
            try
            {

                translate.ReadToFollowing(language);
                translate.ReadToFollowing("money");
                translateDic.Add("money", translate.ReadElementContentAsString());
                translate.ReadToFollowing("reverse");
                translateDic.Add("reverse", translate.ReadElementContentAsString());
                translate.ReadToFollowing("logIn");
                translateDic.Add("logIn", translate.ReadElementContentAsString());
                translate.ReadToFollowing("logOut");
                translateDic.Add("logOut", translate.ReadElementContentAsString());
                translate.ReadToFollowing("remember");
                translateDic.Add("remember", translate.ReadElementContentAsString());
                translate.ReadToFollowing("loginMsg");
                translateDic.Add("loginMsg", translate.ReadElementContentAsString());
                translate.ReadToFollowing("registerLink");
                translateDic.Add("registerLink", translate.ReadElementContentAsString());
                translate.ReadToFollowing("commingSoon");
                translateDic.Add("commingSoon", translate.ReadElementContentAsString());
                translate.ReadToFollowing("registerMsg");
                translateDic.Add("registerMsg", translate.ReadElementContentAsString());
                translate.ReadToFollowing("username");
                translateDic.Add("username", translate.ReadElementContentAsString());
                translate.ReadToFollowing("password");
                translateDic.Add("password", translate.ReadElementContentAsString());
                translate.ReadToFollowing("passwordConfirm");
                translateDic.Add("passwordConfirm", translate.ReadElementContentAsString());
                translate.ReadToFollowing("email");
                translateDic.Add("email", translate.ReadElementContentAsString());
                translate.ReadToFollowing("cancel");
                translateDic.Add("cancel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("register");
                translateDic.Add("register", translate.ReadElementContentAsString());
                translate.ReadToFollowing("forgotPass");
                translateDic.Add("forgotPass", translate.ReadElementContentAsString());
                translate.ReadToFollowing("status");
                translateDic.Add("status", translate.ReadElementContentAsString());
                translate.ReadToFollowing("disconnectMsg");
                translateDic.Add("disconnectMsg", translate.ReadElementContentAsString());
                translate.ReadToFollowing("maintenanceTitle");
                translateDic.Add("maintenanceTitle", translate.ReadElementContentAsString());
                translate.ReadToFollowing("registerDisabled");
                translateDic.Add("registerDisabled", translate.ReadElementContentAsString());
                translate.ReadToFollowing("error404");
                translateDic.Add("error404", translate.ReadElementContentAsString());
                translate.ReadToFollowing("errorUpdate");
                translateDic.Add("errorUpdate", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateCancel");
                translateDic.Add("updateCancel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("settings");
                translateDic.Add("settings", translate.ReadElementContentAsString());
                translate.ReadToFollowing("steamUID");
                translateDic.Add("steamUID", translate.ReadElementContentAsString());
                translate.ReadToFollowing("mission");
                translateDic.Add("mission", translate.ReadElementContentAsString());
                translate.ReadToFollowing("online");
                translateDic.Add("online", translate.ReadElementContentAsString());
                translate.ReadToFollowing("offline");
                translateDic.Add("offline", translate.ReadElementContentAsString());
                translate.ReadToFollowing("notFound");
                translateDic.Add("notFound", translate.ReadElementContentAsString());
                translate.ReadToFollowing("support");
                translateDic.Add("support", translate.ReadElementContentAsString());
                translate.ReadToFollowing("taskforceVersion");
                translateDic.Add("taskforceVersion", translate.ReadElementContentAsString());
                translate.ReadToFollowing("notInstalled");
                translateDic.Add("notInstalled", translate.ReadElementContentAsString());
                translate.ReadToFollowing("installed");
                translateDic.Add("installed", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateTaskforceRequire");
                translateDic.Add("updateTaskforceRequire", translate.ReadElementContentAsString());
                translate.ReadToFollowing("forceUpdateTaskforce");
                translateDic.Add("forceUpdateTaskforce", translate.ReadElementContentAsString());
                translate.ReadToFollowing("installTaskforce");
                translateDic.Add("installTaskforce", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateTaskforce");
                translateDic.Add("updateTaskforce", translate.ReadElementContentAsString());
                translate.ReadToFollowing("play");
                translateDic.Add("play", translate.ReadElementContentAsString());
                translate.ReadToFollowing("download");
                translateDic.Add("download", translate.ReadElementContentAsString());
                translate.ReadToFollowing("update");
                translateDic.Add("update", translate.ReadElementContentAsString());
                translate.ReadToFollowing("forceUpdate");
                translateDic.Add("forceUpdate", translate.ReadElementContentAsString());
                translate.ReadToFollowing("visitSite");
                translateDic.Add("visitSite", translate.ReadElementContentAsString());
                translate.ReadToFollowing("visitTeamSpeak");
                translateDic.Add("visitTeamSpeak", translate.ReadElementContentAsString());
                translate.ReadToFollowing("modDev");
                translateDic.Add("modDev", translate.ReadElementContentAsString());
                translate.ReadToFollowing("chooseArma");
                translateDic.Add("chooseArma", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadProgress");
                translateDic.Add("downloadProgress", translate.ReadElementContentAsString());
                translate.ReadToFollowing("armaOK");
                translateDic.Add("armaOK", translate.ReadElementContentAsString());
                translate.ReadToFollowing("selectArma");
                translateDic.Add("selectArma", translate.ReadElementContentAsString());
                translate.ReadToFollowing("armaNotOK");
                translateDic.Add("armaNotOK", translate.ReadElementContentAsString());
                translate.ReadToFollowing("success");
                translateDic.Add("success", translate.ReadElementContentAsString());
                translate.ReadToFollowing("waitDownload");
                translateDic.Add("waitDownload", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateTaskforceBefore");
                translateDic.Add("updateTaskforceBefore", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadInitialisation");
                translateDic.Add("downloadInitialisation", translate.ReadElementContentAsString());
                translate.ReadToFollowing("pleaseWait");
                translateDic.Add("pleaseWait", translate.ReadElementContentAsString());
                translate.ReadToFollowing("cancelling");
                translateDic.Add("cancelling", translate.ReadElementContentAsString());
                translate.ReadToFollowing("pause");
                translateDic.Add("pause", translate.ReadElementContentAsString());
                translate.ReadToFollowing("resume");
                translateDic.Add("resume", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverRequest");
                translateDic.Add("serverRequest", translate.ReadElementContentAsString());
                translate.ReadToFollowing("listingMod");
                translateDic.Add("listingMod", translate.ReadElementContentAsString());
                translate.ReadToFollowing("listingCpp");
                translateDic.Add("listingCpp", translate.ReadElementContentAsString());
                translate.ReadToFollowing("listingAdditional");
                translateDic.Add("listingAdditional", translate.ReadElementContentAsString());
                translate.ReadToFollowing("alreadyUpToDate");
                translateDic.Add("alreadyUpToDate", translate.ReadElementContentAsString());
                translate.ReadToFollowing("inProgress");
                translateDic.Add("inProgress", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadMod");
                translateDic.Add("downloadMod", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadFile");
                translateDic.Add("downloadFile", translate.ReadElementContentAsString());
                translate.ReadToFollowing("checkMod");
                translateDic.Add("checkMod", translate.ReadElementContentAsString());
                translate.ReadToFollowing("checkCpp");
                translateDic.Add("checkCpp", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadStoped");
                translateDic.Add("downloadStoped", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadFinish");
                translateDic.Add("downloadFinish", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadWillPause");
                translateDic.Add("downloadWillPause", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloadPaused");
                translateDic.Add("downloadPaused", translate.ReadElementContentAsString());
                translate.ReadToFollowing("downloaded");
                translateDic.Add("downloaded", translate.ReadElementContentAsString());
                translate.ReadToFollowing("of");
                translateDic.Add("of", translate.ReadElementContentAsString());
                translate.ReadToFollowing("estimatedTime");
                translateDic.Add("estimatedTime", translate.ReadElementContentAsString());
                translate.ReadToFollowing("waitForDownload");
                translateDic.Add("waitForDownload", translate.ReadElementContentAsString());
                translate.ReadToFollowing("updateAvailable");
                translateDic.Add("updateAvailable", translate.ReadElementContentAsString());
                translate.ReadToFollowing("errorListing");
                translateDic.Add("errorListing", translate.ReadElementContentAsString());
                translate.ReadToFollowing("taskforceInstallerMissing");
                translateDic.Add("taskforceInstallerMissing", translate.ReadElementContentAsString());
                translate.ReadToFollowing("installCancel");
                translateDic.Add("installCancel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("minutes");
                translateDic.Add("minutes", translate.ReadElementContentAsString());
                translate.ReadToFollowing("seconds");
                translateDic.Add("seconds", translate.ReadElementContentAsString());
                translate.ReadToFollowing("hours");
                translateDic.Add("hours", translate.ReadElementContentAsString());
                translate.ReadToFollowing("playersIG");
                translateDic.Add("playersIG", translate.ReadElementContentAsString());
                translate.ReadToFollowing("map");
                translateDic.Add("map", translate.ReadElementContentAsString());
                translate.ReadToFollowing("adminLevel");
                translateDic.Add("adminLevel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("copLevel");
                translateDic.Add("copLevel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("medicLevel");
                translateDic.Add("medicLevel", translate.ReadElementContentAsString());
                translate.ReadToFollowing("cash");
                translateDic.Add("cash", translate.ReadElementContentAsString());
                translate.ReadToFollowing("bank");
                translateDic.Add("bank", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverStatus");
                translateDic.Add("serverStatus", translate.ReadElementContentAsString());
                translate.ReadToFollowing("IGinformations");
                translateDic.Add("IGinformations", translate.ReadElementContentAsString());
                translate.ReadToFollowing("usefulLink");
                translateDic.Add("usefulLink", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverMaintenance");
                translateDic.Add("serverMaintenance", translate.ReadElementContentAsString());
                translate.ReadToFollowing("serverLocked");
                translateDic.Add("serverLocked", translate.ReadElementContentAsString());            

                loginButton.Text = translateDic["logIn"];
                registerLink.Text = translateDic["registerLink"];
                loginUsername.Hint = translateDic["username"];
                loginPassword.Hint = translateDic["password"];
                loginRemember.Text = translateDic["remember"];
                newPassword.Text = translateDic["forgotPass"];
                registerMessage.Text = translateDic["registerMsg"];                           
                this.Refresh();
            }
            catch
            {
                languageChoice formLanguage = new languageChoice(communityName, true);

                // Show the laguage choice
                formLanguage.ShowDialog();

                if (File.Exists(appdata + communityName + "/language.lang"))
                {
                    language = File.ReadAllText(appdata + communityName + "/language.lang");
                    loadLanguage();
                }

            }

        }