Пример #1
0
        private void NewLanguage(object sender, EventArgs e)
        {
            LANG l = LANG.LANG_USA;

            if (sender is PictureBox)
            {
                if (sender == picFRA)
                {
                    l = LANG.LANG_FRA;
                }
            }

            if (l == LANG.LANG_FRA)
            {
                Thread.CurrentThread.CurrentCulture   = new CultureInfo("fr-FR");
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
            }
            else
            {
                Thread.CurrentThread.CurrentCulture   = new CultureInfo("en-US");
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            }

            InitStrings();
        }
Пример #2
0
    public void ChangeLanguage()
    {
        LANG new_language = GetNextLang();

        SetLanguage(new_language);
        if (OnLanguageChanged != null)
        {
            OnLanguageChanged();
        }
    }
Пример #3
0
    public static void SetLanguage(LANG new_language)
    {
        current_language = new_language;

        FloorRouteLabel.OnLanguageChanged();

        for (int i = 0; i < all_instances.Count; i++)
        {
            all_instances[i].TranslateString();
        }
    }
Пример #4
0
        public static LANG GetLang()
        {
            LANG iLang = LANG.EN;

            if (Settings.Default.Language == "EN")
            {
                iLang = LANG.EN;
            }
            else if (Settings.Default.Language == "JP")
            {
                iLang = LANG.JP;
            }

            return(iLang);
        }
Пример #5
0
    void Start()
    {
        language = LanguageChoose.Instance;
        toggle   = GetComponent <Toggle>();

        label = gameObject.name.Substring(8);

        FillDictionary();

        currentLanguage = language.OriginalLanguage;
        if (label == langNames[currentLanguage])
        {
            toggle.interactable = false;
        }
    }
Пример #6
0
 public override void ReadByte(ByteBuffer byteBuf)
 {
     Id                 = byteBuf.ReadInt();
     IsLeader           = byteBuf.ReadBool();
     Race               = StringConvert.IndexToEnum <ERaceType>(byteBuf.ReadInt());
     Name               = LANG.Convert(byteBuf.ReadInt());
     Model              = byteBuf.ReadUTF();
     Age                = byteBuf.ReadInt();
     Power              = byteBuf.ReadLong();
     Speed              = byteBuf.ReadFloat();
     Hp                 = byteBuf.ReadDouble();
     SomeIntParams      = byteBuf.ReadListInt();
     SomeLongParams     = byteBuf.ReadListLong();
     SomeFloatParams    = byteBuf.ReadListFloat();
     SomeDoubleParams   = byteBuf.ReadListDouble();
     SomeStringParams   = byteBuf.ReadListUTF();
     SomeLanguageParams = LANG.Convert(byteBuf.ReadListInt());
     SkillWrapper       = SkillWrapper.Parse(byteBuf);
 }
Пример #7
0
        public string GetText(LANG language)
        {
            switch (language)
            {
            case LANG.EN:
                return(this.text.en);

            case LANG.DE:
                return(this.text.de);

            case LANG.FR:
                return(this.text.fr);

            case LANG.RU:
                return(this.text.ru);

            default:
                Console.WriteLine($"Wrong argument. {language} Return EN");
                return(this.text.en);
            }
        }
Пример #8
0
        public MainDisplay()
        {
            AxisFont    = new Font("宋体", 9);
            NumberFont  = new Font("Arial Unicode MS", 10);
            TitleFont   = new Font("宋体", 12, FontStyle.Bold);
            TitleHeight = 40;
            TickLength  = 2;
            RightSpace  = 30;
            STR         = new Dictionary <LANG, Dictionary <string, string> >();
            Dictionary <string, string> Eng = new Dictionary <string, string>();

            Eng.Add("szAxisXName", "Thickness[mm]");
            Eng.Add("szAxisYName", "Temperature[℃]");
            Eng.Add("szHeatflow", "Heatflow:");
            Eng.Add("szTitle", "Temperature Diagram");
            Eng.Add("szHotface", "Hotface");
            Eng.Add("szColdface", "Coldface");
            STR.Add(LANG.ENG, Eng);
            Dictionary <string, string> Ch = new Dictionary <string, string>();

            Ch.Add("szAxisXName", "厚度[mm]");
            Ch.Add("szAxisYName", "温度[℃]");
            Ch.Add("szHeatflow", "热流:");
            Ch.Add("szTitle", "温度示意图");
            Ch.Add("szHotface", "热面");
            Ch.Add("szColdface", "冷面");
            STR.Add(LANG.CH, Ch);
            lang = LANG.CH;

            InitializeComponent();
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);

            Space         = 5;
            XAxisHeight   = 100;
            YAxisWidth    = 60;
            MinWidth      = 2;
            MaxColor      = Color.Red;
            MinColor      = Color.Blue;
            BoundaryWidth = 20;
        }
Пример #9
0
        public string GetString(string key, LANG lang = LANG.EN)
        {
            string ret = "";

            try
            {
                switch (lang)
                {
                case LANG.EN:
                    ret = dic_en[key];
                    break;

                case LANG.JP:
                    ret = dic_jp[key];
                    break;

                default:
                    ret = dic_en[key];
                    break;
                }
            }
            catch (Exception)
            {
                switch (lang)
                {
                case LANG.EN:
                    ret = "Undefined";
                    break;

                case LANG.JP:
                    ret = "正義されない";
                    break;

                default:
                    ret = "Undefined";
                    break;
                }
            }
            return(ret);
        }
Пример #10
0
 private void Update()
 {
     org = language.OriginalLanguage;
     tar = language.TargetLanguage;
 }
Пример #11
0
 protected BaseFactory(LANG currentLANG)
 {
     this.currentLANG = currentLANG;
 }
Пример #12
0
 public WAVFactory(LANG currentLANG) : base(currentLANG, Config.pathToWAVJsonFile)
 {
 }
Пример #13
0
 public void Create()
 {
     AddElement(1, new CfgMonsterTable(1, LANG.Convert(178940420), 1002, 10f, 1.2f, 4f, "10001", 8f, 20f, 100, 0, 20, 0));
     AddElement(2, new CfgMonsterTable(2, LANG.Convert(178979727), 1003, 10f, 1.2f, 4f, "10001", 8f, 20f, 200, 0, 10, 10));
     AddElement(3, new CfgMonsterTable(3, LANG.Convert(1421729370), 1004, 30f, 2.4f, 4f, "10001", 8f, 20f, 1000, 0, 10, 10));
 }
Пример #14
0
 public void Create()
 {
     AddElement(1001, new CfgSkillTable(1001, LANG.Convert(88134997), 1002, "", 0.9f, 1f, 0, 0.2f, 100f, 1.5f));
     AddElement(1002, new CfgSkillTable(1002, LANG.Convert(1351039565), 1005, "", 1.2f, 1f, 0, 0.8f, 50f, 3f));
     AddElement(1003, new CfgSkillTable(1003, LANG.Convert(-1257327582), 1004, "", 1f, 5f, 0, 0f, 0f, 0f));
 }
Пример #15
0
 public void Create()
 {
     AddElement(1, new CfgPlayerTable(1, LANG.Convert(91216312), 1001, 1.2f, 4f, "10001", 100, 100, 20, 10));
 }
Пример #16
0
 public FBXFactory(LANG currentLANG) : base(currentLANG, Config.pathToFBXJsonFile)
 {
 }
Пример #17
0
 public void SetOriginalLanguage()
 {
     originalLanguage = (LANG)originalLangDropdown.value;
     Debug.Log("set original language");
 }
Пример #18
0
 public TXTFactory(LANG currentLANG) : base(currentLANG, "")
 {
 }
Пример #19
0
        /// <summary>
        /// Method used to add a property to the instance. Will be placed in the correct class Property.
        /// </summary>
        /// <param name="input">The vCard.Property to add.</param>
        public void AddProperty(Props.IProperty input)
        {
            if (input == null || input.IsValueNull)
            {
                return;
            }

            switch (input.Property)
            {
            case KnownProperties.ADR:
                ADR.AddIfNotNull(input as Props.ADR);
                break;

            case KnownProperties.ANNIVERSARY:
                ANNIVERSARY = input as Props.ANNIVERSARY;
                break;

            case KnownProperties.BDAY:
                BDAY = input as Props.BDAY;
                break;

            case KnownProperties.CALADRURI:
                CALADRURI.AddIfNotNull(input as Props.CALADRURI);
                break;

            case KnownProperties.CALURI:
                CALURI.AddIfNotNull(input as Props.CALURI);
                break;

            case KnownProperties.CATEGORIES:
                CATEGORIES.AddIfNotNull(input as Props.CATEGORIES);
                break;

            case KnownProperties.CLIENTPIDMAP:
                CLIENTPIDMAP.AddIfNotNull(input as Props.CLIENTPIDMAP);
                break;

            case KnownProperties.EMAIL:
                EMAIL.AddIfNotNull(input as Props.EMAIL);
                break;

            case KnownProperties.FBURL:
                FBURL.AddIfNotNull(input as Props.FBURL);
                break;

            case KnownProperties.FN:
                FN.AddIfNotNull(input as Props.FN);
                break;

            case KnownProperties.GENDER:
                GENDER = input as Props.GENDER;
                break;

            case KnownProperties.GEO:
                GEO.AddIfNotNull(input as Props.GEO);
                break;

            case KnownProperties.IMPP:
                IMPP.AddIfNotNull(input as Props.IMPP);
                break;

            case KnownProperties.KEY:
                KEY.AddIfNotNull(input as Props.KEY);
                break;

            case KnownProperties.KIND: {
                char k = (input as Props.KIND).Value.ToLower()[0];
                if (k == 'i')
                {
                    KIND = Kinds.Individual;
                }
                else if (k == 'g')
                {
                    KIND = Kinds.Group;
                }
                else if (k == 'o')
                {
                    KIND = Kinds.Org;
                }
                else if (k == 'l')
                {
                    KIND = Kinds.Location;
                }
                else
                {
                    KIND = Kinds.Individual;
                }
                break;
            }

            case KnownProperties.LANG:
                LANG.AddIfNotNull(input as Props.LANG);
                break;

            case KnownProperties.LOGO:
                LOGO.AddIfNotNull(input as Props.LOGO);
                break;

            case KnownProperties.MEMBER:
                MEMBER.AddIfNotNull(input as Props.MEMBER);
                break;

            case KnownProperties.N:
                N = input as Props.N;
                break;

            case KnownProperties.NICKNAME:
                NICKNAME.AddIfNotNull(input as Props.NICKNAME);
                break;

            case KnownProperties.NOTE:
                NOTE.AddIfNotNull(input as Props.NOTE);
                break;

            case KnownProperties.ORG:
                ORG.AddIfNotNull(input as Props.ORG);
                break;

            case KnownProperties.PHOTO:
                PHOTO.AddIfNotNull(input as Props.PHOTO);
                break;

            case KnownProperties.PRODID:
                PRODID = input as Props.PRODID;
                break;

            case KnownProperties.RELATED:
                RELATED.AddIfNotNull(input as Props.RELATED);
                break;

            case KnownProperties.REV:
                REV = input as Props.REV;
                break;

            case KnownProperties.ROLE:
                ROLE.AddIfNotNull(input as Props.ROLE);
                break;

            case KnownProperties.SOUND:
                SOUND.AddIfNotNull(input as Props.SOUND);
                break;

            case KnownProperties.SOURCE:
                SOURCE.AddIfNotNull(input as Props.SOURCE);
                break;

            case KnownProperties.TEL:
                TEL.AddIfNotNull(input as Props.TEL);
                break;

            case KnownProperties.TITLE:
                TITLE.AddIfNotNull(input as Props.TITLE);
                break;

            case KnownProperties.TZ:
                TZ.AddIfNotNull(input as Props.TZ);
                break;

            case KnownProperties.UID:
                UID = input as Props.UID;
                break;

            case KnownProperties.URL:
                URL.AddIfNotNull(input as Props.URL);
                break;

            case KnownProperties.VERSION:
                VERSION = input as Props.VERSION;
                break;

            case KnownProperties.XML:
                XML.AddIfNotNull(input as Props.XML);
                break;

            default:
                return;
            }
        }
Пример #20
0
 public static uint MAKELANG(LANG p, SUBLANG s) => ((uint)s << 10) | (uint)p;
Пример #21
0
 public void Create()
 {
     AddElement("UILogin1".GetHashCode(), new CfgUILanguageTable("UILogin1".GetHashCode(), LANG.Convert(-347589321)));
     AddElement("UISetting1".GetHashCode(), new CfgUILanguageTable("UISetting1".GetHashCode(), LANG.Convert(-487833582)));
     AddElement("UISetting2".GetHashCode(), new CfgUILanguageTable("UISetting2".GetHashCode(), LANG.Convert(1015751757)));
     AddElement("UISetting3".GetHashCode(), new CfgUILanguageTable("UISetting3".GetHashCode(), LANG.Convert(-50860896)));
     AddElement("UISetting4".GetHashCode(), new CfgUILanguageTable("UISetting4".GetHashCode(), LANG.Convert(337257549)));
     AddElement("UISetting5".GetHashCode(), new CfgUILanguageTable("UISetting5".GetHashCode(), LANG.Convert(-384687027)));
     AddElement("UICommon1".GetHashCode(), new CfgUILanguageTable("UICommon1".GetHashCode(), LANG.Convert(107007938)));
 }
Пример #22
0
 protected BaseFactory(LANG currentLANG, string jsonPath)
 {
     this.currentLANG = currentLANG;
     JsonPath         = jsonPath;
 }
Пример #23
0
 void Awake()
 {
     all_instances.Add(this);
     current_language = (LANG)PlayerPrefs.GetInt(LangKey, 0);
 }