예제 #1
0
        static public int SelectLanguage(String name)//Ok
        {
            int i = Langs.Count() - 1;

            for (; 0 < i; i--)
            {
                if (Langs[i].Name == name)
                {
                    break;
                }
            }
            LangCur = Langs[i];
            return(i);
        }
예제 #2
0
        private void SetText(LanguageRecord lang)//
        {
            int idx;

            toolTip.RemoveAll();
            Text = lang.lOFTitle;
            //# Main
            tpMain.Text = lang.lOFTabMain;
            // Language
            gbLanguage.Text      = lang.lOFMainLanguage;
            lblLanguagePath.Text = lang.lOFMainLanguagePath;
            toolTip.SetToolTip(btnGetLanguagePath, lang.hOFMainRootGet);
            // Behaiour
            gbRoots.Text        = lang.lOFMainRoots;
            lblRootMaps.Text    = lang.lOFMainRootMaps;
            lblRootObjects.Text = lang.lOFMainRootObjects;
            lblRootLinks.Text   = lang.lOFMainRootLinks;
            lblRootBoxes.Text   = lang.lOFMainRootBoxes;
            toolTip.SetToolTip(btnGetRootMaps, lang.hOFMainRootGet);
            toolTip.SetToolTip(btnGetRootObjects, lang.hOFMainRootGet);
            toolTip.SetToolTip(btnGetRootLinks, lang.hOFMainRootGet);
            toolTip.SetToolTip(btnGetRootBoxes, lang.hOFMainRootGet);
            // Folders
            idx = cbbOnStart.SelectedIndex;
            cbbOnStart.Items.Clear();
            cbbOnStart.Items.Add(lang.lOFMainOnStart0Empty);
            cbbOnStart.Items.Add(lang.lOFMainOnStart1Ask);
            cbbOnStart.Items.Add(lang.lOFMainOnStart2Load);
            cbbOnStart.SelectedIndex = idx;
            idx = cbbOnClose.SelectedIndex;
            cbbOnClose.Items.Clear();
            cbbOnClose.Items.Add(lang.lOFMainOnClose0Exit);
            cbbOnClose.Items.Add(lang.lOFMainOnClose1Ask);
            cbbOnClose.Items.Add(lang.lOFMainOnClose2Save);
            cbbOnClose.SelectedIndex = idx;
            gbBehaiour.Text          = lang.lOFMainBehaiour;
            lblOnStart.Text          = lang.lOFMainOnStart;
            lblOnClose.Text          = lang.lOFMainOnClose;
            chkPingPeriod.Text       = lang.lOFMainPingPeriod;
            lblPingCount.Text        = lang.lOFMainPingCount;

            //# Map
            tpMap.Text = lang.lOFTabMap;
            // Grid
            gbGrid.Text       = lang.lMOGrid;
            chkGridStore.Text = lang.lMOStoreInMap;
            idx = cbbGridStyle.SelectedIndex;
            cbbGridStyle.Items.Clear();
            cbbGridStyle.Items.Add(lang.lMOGridStyle0None);
            cbbGridStyle.Items.Add(lang.lMOGridStyle1Dots);
            cbbGridStyle.Items.Add(lang.lMOGridStyle2Corners);
            cbbGridStyle.Items.Add(lang.lMOGridStyle3Crosses);
            cbbGridStyle.Items.Add(lang.lMOGridStyle4Grid);
            cbbGridStyle.SelectedIndex = idx;
            toolTip.SetToolTip(btnGridColor, lang.hEEColorPick);
            lblGridThick.Text = lang.lEELineThick;
            chkGridAlign.Text = lang.lMOGridAlign;
            // Background
            gbBack.Text       = lang.lMOBack;
            chkBackStore.Text = lang.lMOStoreInMap;
            idx = cbbBackStyle.SelectedIndex;
            cbbBackStyle.Items.Clear();
            cbbBackStyle.Items.Add(lang.lMOBackStyle0Color);
            cbbBackStyle.Items.Add(lang.lMOBackStyle1ImageAlign);
            cbbBackStyle.Items.Add(lang.lMOBackStyle2ImageTile);
            cbbBackStyle.Items.Add(lang.lMOBackStyle3ImageStrech);
            cbbBackStyle.Items.Add(lang.lMOBackStyle4ImageZInner);
            cbbBackStyle.Items.Add(lang.lMOBackStyle5ImageZOutter);
            cbbBackStyle.SelectedIndex = idx;
            toolTip.SetToolTip(btnBackColor, lang.hEEColorPick);
            toolTip.SetToolTip(btnAlphaColor, lang.hEEColorPick);
            toolTip.SetToolTip(btnGetBackImage, lang.hEEImageLoad);
            chkTransparentColor.Text = lang.lMOBackTransparentColor;
            lblBackgImagePath.Text   = lang.lEEImagePath;
            chkBackImageFloat.Text   = lang.lEEImageFloat;
            chkBackImageBuildIn.Text = lang.lEEImageBuildIn;
            lblBackImageAlign.Text   = lang.lEEAlign;
            lblBackImageBPP.Text     = lang.lEEImageBPP;
            idx = cbbBackImageAlign.SelectedIndex;
            cbbBackImageAlign.Items.Clear();
            cbbBackImageAlign.Items.Add(lang.lEEAlign0TL);
            cbbBackImageAlign.Items.Add(lang.lEEAlign1TC);
            cbbBackImageAlign.Items.Add(lang.lEEAlign2TR);
            cbbBackImageAlign.Items.Add(lang.lEEAlign3ML);
            cbbBackImageAlign.Items.Add(lang.lEEAlign4MC);
            cbbBackImageAlign.Items.Add(lang.lEEAlign5MR);
            cbbBackImageAlign.Items.Add(lang.lEEAlign6BL);
            cbbBackImageAlign.Items.Add(lang.lEEAlign7BC);
            cbbBackImageAlign.Items.Add(lang.lEEAlign8BR);
            cbbBackImageAlign.SelectedIndex = idx;
        }