Exemple #1
0
 /// <summary>
 /// Clears all string lists within this container.
 /// </summary>
 public void Clear()
 {
     English.Clear();
     Japanese.Clear();
     German.Clear();
     French.Clear();
     Spanish.Clear();
     Italian.Clear();
     Korean.Clear();
     Chinese.Clear();
     Portuguese.Clear();
 }
Exemple #2
0
    void Start()
    {
        GameObject p1 = null;

        GameObject[] rootObjects = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects();
        foreach (GameObject i in rootObjects)
        {
            if (i.name == "P2")
            {
                p1 = i;
                break;
            }
        }

        other_player = p1.transform.Find("Player2").GetComponent <CharacterBehavior>();

        int type = GameSetting.selec_p1;

        switch (type)
        {
        case 0: _skill = new European(this, other_player);
            break;

        case 1: _skill = new Korean(this, other_player);
            break;

        case 2: _skill = new Egyptian(this, other_player);
            break;

        case 3: _skill = new American(this, other_player);
            break;

        case 4: _skill = new NorthAmerican(this, other_player);
            break;

        default:
            break;
        }
        hearts    = new Image[3];
        hearts[0] = GameObject.Find("Canvas/P1/P1_heart/P1_heart1").GetComponent <Image>();
        hearts[1] = GameObject.Find("Canvas/P1/P1_heart/P1_heart2").GetComponent <Image>();
        hearts[2] = GameObject.Find("Canvas/P1/P1_heart/P1_heart3").GetComponent <Image>();

        gifts    = new Image[3];
        gifts[0] = GameObject.Find("Canvas/P1/P1_skill/P1_skillt1").GetComponent <Image>();
        gifts[1] = GameObject.Find("Canvas/P1/P1_skill/P1_skillt2").GetComponent <Image>();
        gifts[2] = GameObject.Find("Canvas/P1/P1_skill/P1_skillt3").GetComponent <Image>();

        StartCoroutine(CheckDie());
        StartCoroutine(CheckHp());
        StartCoroutine(CheckMp());
        StartCoroutine(FinishChecker());
    }
Exemple #3
0
        /// <summary>
        /// </summary>
        /// <param name="cultureInfo"> </param>
        public static void Update(CultureInfo cultureInfo)
        {
            var culture = cultureInfo.TwoLetterISOLanguageName;
            ResourceDictionary dictionary;

            if (Constants.Supported.Contains(culture))
            {
                switch (culture)
                {
                case "fr":
                    dictionary = French.Context();
                    break;

                case "ja":
                    dictionary = Japanese.Context();
                    break;

                case "de":
                    dictionary = German.Context();
                    break;

                case "zh":
                    dictionary = Chinese.Context();
                    break;

                case "ru":
                    dictionary = Russian.Context();
                    break;

                case "ko":
                    dictionary = Korean.Context();
                    break;

                default:
                    dictionary = English.Context();
                    break;
                }
            }
            else
            {
                dictionary = English.Context();
            }
            var locale = dictionary.Cast <DictionaryEntry>()
                         .ToDictionary(item => (string)item.Key, item => (string)item.Value);

            AppViewModel.Instance.Locale = locale;
            foreach (var pluginInstance in App.Plugins.Loaded.Cast <PluginInstance>()
                     .Where(pluginInstance => pluginInstance.Loaded))
            {
                pluginInstance.Instance.Locale = locale;
            }
        }
Exemple #4
0
        private void TxtreturnList_SelectedIndexChanged(object sender, EventArgs e)
        {
            int s = Int32.Parse(txtreturnList.SelectedItem.ToString());

            for (int i = 0; i <= Korean.Items.Count - 1; i++)
            {
                if (i == s)
                {
                    Korean.SetSelected(i, true);
                    break;
                }
            }
        }
Exemple #5
0
        /// <summary>
        /// </summary>
        /// <param name="cultureInfo"> </param>
        public static void Update(CultureInfo cultureInfo)
        {
            var culture = cultureInfo.TwoLetterISOLanguageName;
            Dictionary <string, string> dictionary;

            if (Constants.Supported.Contains(culture))
            {
                switch (culture)
                {
                case "fr":
                    dictionary = French.Context();
                    break;

                case "ja":
                    dictionary = Japanese.Context();
                    break;

                case "de":
                    dictionary = German.Context();
                    break;

                case "zh":
                    dictionary = Chinese.Context();
                    break;

                case "ru":
                    dictionary = Russian.Context();
                    break;

                case "ko":
                    dictionary = Korean.Context();
                    break;

                default:
                    dictionary = English.Context();
                    break;
                }
            }
            else
            {
                dictionary = English.Context();
            }

            AppViewModel.Instance.Locale = dictionary;
            foreach (PluginInstance pluginInstance in App.Plugins.Loaded.Cast <PluginInstance>().Where(pluginInstance => pluginInstance.Loaded))
            {
                pluginInstance.Instance.Locale = dictionary;
            }
        }
Exemple #6
0
        private void TxtSearch_TextChanged(object sender, EventArgs e)
        {
            string myString = txtSearch.Text;
            bool   found    = false;

            for (int i = 0; i <= Korean.Items.Count - 1; i++)
            {
                if (Korean.Items[i].ToString().Contains(myString))
                {
                    Korean.SetSelected(i, true);
                    found = true;
                    break;
                }
            }
        }
 public bool Contains(string str, StringComparison comparisonType = StringComparison.InvariantCultureIgnoreCase)
 {
     if (English.Equals(str, comparisonType) ||
         French.Equals(str, comparisonType) ||
         German.Equals(str, comparisonType) ||
         Italian.Equals(str, comparisonType) ||
         Japanese.Equals(str, comparisonType) ||
         Korean.Equals(str, comparisonType) ||
         Spanish.Equals(str, comparisonType))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #8
0
 private void TextBox1_TextChanged(object sender, EventArgs e)
 {
     try
     {
         txtreturnList.Items.Clear();
         string s = (from d in Translations where d.Value == textBox1.Text select d.Key).FirstOrDefault();
         for (int i = 0; i <= Korean.Items.Count - 1; i++)
         {
             if (Korean.Items[i].ToString().Contains(s))
             {
                 Korean.SetSelected(i, true);
                 txtreturnList.Items.Add(i);
                 break;
             }
         }
     }
     catch { }
 }
Exemple #9
0
        public PopupNotificationDialog(string message, PopupNotificationDialog dialog)
        {
            popup = new Popup();

            popup.text.Text = Korean.ReplaceJosa(message);

            popup.Width = 60 + MeasureString(popup.text.Text);
            CornerRadius cornerRadius = new CornerRadius(5);

            popup.background.CornerRadius = cornerRadius;

            popup.Left = 20;

            if (dialog != null)
            {
                popup.Top = 7 + dialog.popup.Top + dialog.popup.Height;
            }
            else
            {
                popup.Top = 20;
            }
        }
 internal void LanguagePacksReadFromCache(Halo2.CacheFile c)
 {
     if (!English.IsLoaded)
     {
         English.ReadFromCache(c);
     }
     if (!Japanese.IsLoaded)
     {
         Japanese.ReadFromCache(c);
     }
     if (!German.IsLoaded)
     {
         German.ReadFromCache(c);
     }
     if (!French.IsLoaded)
     {
         French.ReadFromCache(c);
     }
     if (!Spanish.IsLoaded)
     {
         Spanish.ReadFromCache(c);
     }
     if (!Italian.IsLoaded)
     {
         Italian.ReadFromCache(c);
     }
     if (!Korean.IsLoaded)
     {
         Korean.ReadFromCache(c);
     }
     if (!Chinese.IsLoaded)
     {
         Chinese.ReadFromCache(c);
     }
     if (!Portuguese.IsLoaded)
     {
         Portuguese.ReadFromCache(c);
     }
 }
Exemple #11
0
        private void OnDateChanged(DateTimeValue x)
        {
            HasValue = true;

            DateTime date = DateTime.Now;

            if (x is PersianDateValue)
            {
                date = Persian.ToDateTime();
            }
            else if (x is GregorianDateValue)
            {
                date = Gregorian.ToDateTime();
            }
            else if (x is HebrewDateValue)
            {
                date = Hebrew.ToDateTime();
            }
            else if (x is HijriDateValue)
            {
                date = Hijri.ToDateTime();
            }
            else if (x is JulianDateValue)
            {
                date = Julian.ToDateTime();
            }
            else if (x is KoreanDateValue)
            {
                date = Korean.ToDateTime();
            }
            else if (x is JapaneseDateValue)
            {
                date = Japanese.ToDateTime();
            }
            else if (x is TaiwanDateValue)
            {
                date = Taiwan.ToDateTime();
            }
            else if (x is KoreanLunisolarDateValue)
            {
                date = KoreanLunisolar.ToDateTime();
            }
            else if (x is JapaneseLunisolarDateValue)
            {
                date = JapaneseLunisolar.ToDateTime();
            }
            else if (x is TaiwanLunisolarDateValue)
            {
                date = TaiwanLunisolar.ToDateTime();
            }
            else if (x is ChineseLunisolarDateValue)
            {
                date = ChineseLunisolar.ToDateTime();
            }

            if (persian != null && !(x is PersianDateValue))
            {
                Persian.DateChanged -= OnDateChanged;
                Persian.Read(date);
            }

            if (gregorian != null && !(x is GregorianDateValue))
            {
                Gregorian.DateChanged -= OnDateChanged;
                Gregorian.Read(date);
            }
            if (julian != null && !(x is JulianDateValue))
            {
                Julian.DateChanged -= OnDateChanged;
                Julian.Read(date);
            }
            if (hebrew != null && !(x is HebrewDateValue))
            {
                Hebrew.DateChanged -= OnDateChanged;
                Hebrew.Read(date);
            }
            if (hijri != null && !(x is HijriDateValue))
            {
                Hijri.DateChanged -= OnDateChanged;
                Hijri.Read(date);
            }
            if (korean != null && !(x is KoreanDateValue))
            {
                Korean.DateChanged -= OnDateChanged;
                Korean.Read(date);
            }
            if (japanese != null && !(x is JapaneseDateValue))
            {
                Japanese.DateChanged -= OnDateChanged;
                Japanese.Read(date);
            }
            if (taiwan != null && !(x is TaiwanDateValue))
            {
                Taiwan.DateChanged -= OnDateChanged;
                Taiwan.Read(date);
            }
            if (koreanLunisolar != null && !(x is KoreanLunisolarDateValue))
            {
                KoreanLunisolar.DateChanged -= OnDateChanged;
                KoreanLunisolar.Read(date);
            }
            if (japaneseLunisolar != null && !(x is JapaneseLunisolarDateValue))
            {
                JapaneseLunisolar.DateChanged -= OnDateChanged;
                JapaneseLunisolar.Read(date);
            }
            if (taiwanLunisolar != null && !(x is TaiwanLunisolarDateValue))
            {
                TaiwanLunisolar.DateChanged -= OnDateChanged;
                TaiwanLunisolar.Read(date);
            }
            if (chineseLunisolar != null && !(x is ChineseLunisolarDateValue))
            {
                ChineseLunisolar.DateChanged -= OnDateChanged;
                ChineseLunisolar.Read(date);
            }

            if (persian != null && !(x is PersianDateValue))
            {
                Persian.DateChanged += OnDateChanged;
            }

            if (gregorian != null && !(x is GregorianDateValue))
            {
                Gregorian.DateChanged += OnDateChanged;
            }

            if (julian != null && !(x is JulianDateValue))
            {
                Julian.DateChanged += OnDateChanged;
            }

            if (hebrew != null && !(x is HebrewDateValue))
            {
                Hebrew.DateChanged += OnDateChanged;
            }

            if (hijri != null && !(x is HijriDateValue))
            {
                Hijri.DateChanged += OnDateChanged;
            }

            if (korean != null && !(x is KoreanDateValue))
            {
                Korean.DateChanged += OnDateChanged;
            }

            if (japanese != null && !(x is JapaneseDateValue))
            {
                Japanese.DateChanged += OnDateChanged;
            }

            if (taiwan != null && !(x is TaiwanDateValue))
            {
                Taiwan.DateChanged += OnDateChanged;
            }

            if (koreanLunisolar != null && !(x is KoreanLunisolarDateValue))
            {
                KoreanLunisolar.DateChanged += OnDateChanged;
            }

            if (japaneseLunisolar != null && !(x is JapaneseLunisolarDateValue))
            {
                JapaneseLunisolar.DateChanged += OnDateChanged;
            }

            if (taiwanLunisolar != null && !(x is TaiwanLunisolarDateValue))
            {
                TaiwanLunisolar.DateChanged += OnDateChanged;
            }

            if (chineseLunisolar != null && !(x is ChineseLunisolarDateValue))
            {
                ChineseLunisolar.DateChanged += OnDateChanged;
            }
        }