コード例 #1
0
        public void Initialize()
        {
            ArrayList langlist;

            UIPreference.InitializeLanguage(out langlist);
            m_LangArrayList = langlist;
            //m_ComboBoxLang
            m_ComboBoxLang.Items.Clear();
            for (int i = 0; i < langlist.Count; i++)
            {
                CultureInfo cInfo = new CultureInfo((int)langlist[i]);
                //m_ComboBoxLang.Items.Add(cInfo.DisplayName);
                if (Thread.CurrentThread.CurrentUICulture.LCID == 0x0409)
                {
                    m_ComboBoxLang.Items.Add(cInfo.EnglishName);
                }
                else
                {
                    m_ComboBoxLang.Items.Add(cInfo.NativeName);
                }
            }
            //m_ComboBoxPass.SelectedIndex = FoundMatchPass(passStr);

            //m_ComboBoxViewMode
            m_ComboBoxViewMode.Items.Clear();
            foreach (UIViewMode mode in Enum.GetValues(typeof(UIViewMode)))
            {
#if !XINLAN
                if (mode >= UIViewMode.NotifyIcon)
                {
                    continue;
                }
#else
                if (mode == UIViewMode.NotifyIcon)
                {
                    continue;
                }
#endif
                string cmode = ResString.GetEnumDisplayName(typeof(UIViewMode), mode);
                m_ComboBoxViewMode.Items.Add(cmode);
            }

            //m_ComboBoxUnit
            m_ComboBoxUnit.Items.Clear();
            foreach (UILengthUnit mode in Enum.GetValues(typeof(UILengthUnit)))
            {
                if (mode == UILengthUnit.Null)
                {
                    continue;
                }
                string cmode = ResString.GetEnumDisplayName(typeof(UILengthUnit), mode);
                m_ComboBoxUnit.Items.Add(cmode);
            }
            //m_CheckedListBoxJobListHeader
            m_CheckedListBoxJobListHeader.Items.Clear();
            foreach (JobListColumnHeader mode in Enum.GetValues(typeof(JobListColumnHeader)))
            {
                string cmode = ResString.GetEnumDisplayName(typeof(JobListColumnHeader), mode);
                m_CheckedListBoxJobListHeader.Items.Add(cmode);
            }

            comCancelButtonAction.Items.Clear();
            foreach (CanleType mode in Enum.GetValues(typeof(CanleType)))
            {
                if (mode == CanleType.None)
                {
                    continue;
                }
                string cmode = ResString.GetEnumDisplayName(typeof(CanleType), mode);
                comCancelButtonAction.Items.Add(cmode);
            }
        }