Пример #1
0
        private void LoadLang(string lang)
        {
            string langFile = Path.GetDirectoryName(Application.ExecutablePath) +  "\\" + lang + ".lng" ;
            if(File.Exists(langFile)){
                languageStrings = new SimpleIni(langFile, false, true) ;
                string currentString ;

                currentString = languageStrings[LANG_CANCEL] ;
                if(currentString != "")
                    buttonCancel.Text = currentString ;

                currentString = languageStrings[LANG_SELECT] ;
                if(currentString != "")
                    buttonSelectDestination.Text = currentString ;

                currentString = languageStrings[LANG_SELECT] ;
                if(currentString != "")
                    buttonSlectOrigin.Text = currentString ;

                currentString = languageStrings[LANG_START] ;
                if(currentString != "")
                    buttonStart.Text = currentString ;

                currentString = languageStrings[LANG_ORIGIN] ;
                if(currentString != "")
                    labelOrigin.Text = currentString ;

                currentString = languageStrings[LANG_DESTINATION] ;
                if(currentString != "")
                    labeDestination.Text = currentString ;

                currentString = languageStrings[LANG_WAIT] ;
                if(currentString != "")
                    labelWait.Text = currentString ;

                currentString = languageStrings[LANG_KEEP_FILES] ;
                if(currentString != "")
                    checkBoxKeepFiles.Text = currentString ;

                currentString = languageStrings[LANG_FILE] ;
                if(currentString != "")
                    fileToolStripMenuItem.Text = currentString ;

                currentString = languageStrings[LANG_EXIT] ;
                if(currentString != "")
                    exitToolStripMenuItem.Text = currentString ;

                currentString = languageStrings[LANG_LANGUAGE] ;
                if(currentString != "")
                    languageToolStripMenuItem.Text = currentString ;

                currentString = languageStrings[LANG_ABOUT] ;
                if(currentString != "")
                    aboutToolStripMenuItem.Text = currentString ;

                currentString = languageStrings[LANG_LAST_REPORT] ;
                if(currentString != "")
                    showLastReportToolStripMenuItem.Text = currentString ;

                currentString = languageStrings[LANG_LAST_REPORT_MSG] ;
                if(currentString != "")
                    MSG_LAST_REPORT_NOT_EXIST = currentString ;

                currentString = languageStrings[LANG_LAST_USED] ;
                if(currentString != "")
                    MSG_LAST_USED = currentString ;

                currentString = languageStrings[LANG_PROFILE] ;
                if(currentString != "")
                    labelProfile.Text = currentString ;

                currentString = languageStrings[LANG_PROFILE_INPUT_MSG] ;
                if(currentString != "")
                    MSG_PROFILE_INPUT = currentString ;

                tip.RemoveAll() ;

                currentString = languageStrings[LANG_ADD] ;
                if(currentString != "")
                    tip.SetToolTip(buttonAdd, currentString) ;

                currentString = languageStrings[LANG_DEL] ;
                if(currentString != "")
                    tip.SetToolTip(buttonDel, currentString) ;

                currentString = languageStrings[LANG_EDIT] ;
                if(currentString != "")
                    tip.SetToolTip(buttonEdit, currentString) ;

                this.Refresh() ;
                properties[REG_LANGUAGE] = lang ;
            }
        }
Пример #2
0
        private void LoadLang(string lang)
        {
            string langFile = Path.GetDirectoryName(Application.ExecutablePath) +  "\\" + lang + ".lng" ;
            if(File.Exists(langFile)){
                languageStrings = new SimpleIni(langFile, false, true) ;
                string currentString ;

                currentString = languageStrings[LANG_COPIES_DONE] ;
                if(currentString != "")
                    tabPageCopiesDone.Text = currentString ;

                currentString = languageStrings[LANG_COPIES_FAILED] ;
                if(currentString != "")
                    tabPageCopiesFailed.Text = currentString ;

                currentString = languageStrings[LANG_DELETIONS_DONE] ;
                if(currentString != "")
                    tabPageDeletionsDone.Text = currentString ;

                currentString = languageStrings[LANG_DELETIONS_FAILED] ;
                if(currentString != "")
                    tabPageDeletionsFailed.Text = currentString ;

                currentString = languageStrings[LANG_FONT] ;
                if(currentString != "")
                    fontToolStripMenuItem.Text = currentString ;

                currentString = languageStrings[LANG_LOGS_TITLE] ;
                if(currentString != "")
                    this.Text = "Antigrafon - " + currentString ;

                currentString = languageStrings[LANG_SAVE] ;
                if(currentString != "")
                    saveToolStripMenuItem.Text = currentString ;

                this.Refresh() ;
            }
        }