예제 #1
0
        private void LoadSettings()
        {
            this.m_moduleNames        = new string[this.m_genericInputMethods.Count];
            this.m_moduleXMLFilePaths = new string[this.m_genericInputMethods.Count];
            this.m_moduleDictionaries = new Dictionary <string, string> [this.m_genericInputMethods.Count];

            int i = 0;

            foreach (KeyValuePair <string, string> kvp in m_genericInputMethods)
            {
                string cin = kvp.Key;

                this.m_moduleNames[i]        = cin;
                this.m_moduleXMLFilePaths[i] = TakaoHelper.GetXMLFullPath(m_venderIdentifer + "." + cin + ".plist");
                this.m_moduleDictionaries[i] = TakaoHelper.DictionaryFromFile(m_moduleXMLFilePaths[i]);
                try
                {
                    // The default values;
                    this.m_moduleDictionaries[i].Add("MaximumRadicalLength", "20");
                    this.m_moduleDictionaries[i].Add("ShouldCommitAtMaximumRadicalLength", "false");
                    this.m_moduleDictionaries[i].Add("ClearReadingBufferAtCompositionError", "false");
                    this.m_moduleDictionaries[i].Add("MatchOneChar", "?");
                    this.m_moduleDictionaries[i].Add("MatchZeroOrMoreChar", "*");
                    this.m_moduleDictionaries[i].Add("UseDynamicFrequency", "false");
                }
                catch { }
                this.u_modulesListBox.Items.Add(kvp.Value);
                PanelGenericSettings setting = new PanelGenericSettings(cin, kvp.Value, m_moduleDictionaries[i], u_applyButton);
                this.AddPanel(setting, cin);
                i++;
            }
            this.u_modulesListBox.SelectedIndex = 0;
        }
예제 #2
0
        private void LoadSettings()
        {
            this.m_moduleNames = new string[this.m_genericInputMethods.Count];
            this.m_moduleXMLFilePaths = new string[this.m_genericInputMethods.Count];
            this.m_moduleDictionaries = new Dictionary<string, string>[this.m_genericInputMethods.Count];

            int i = 0;
            foreach (KeyValuePair<string, string> kvp in m_genericInputMethods)
            {
                string cin = kvp.Key;

                this.m_moduleNames[i] = cin;
                this.m_moduleXMLFilePaths[i] = TakaoHelper.GetXMLFullPath(m_venderIdentifer + "." + cin + ".plist");
                this.m_moduleDictionaries[i] = TakaoHelper.DictionaryFromFile(m_moduleXMLFilePaths[i]);
                try
                {
                    // The default values;
                    this.m_moduleDictionaries[i].Add("MaximumRadicalLength", "20");
                    this.m_moduleDictionaries[i].Add("ShouldCommitAtMaximumRadicalLength", "false");
                    this.m_moduleDictionaries[i].Add("ClearReadingBufferAtCompositionError", "false");
                    this.m_moduleDictionaries[i].Add("MatchOneChar", "?");
                    this.m_moduleDictionaries[i].Add("MatchZeroOrMoreChar", "*");
                    this.m_moduleDictionaries[i].Add("UseDynamicFrequency", "false");
                }
                catch { }
                this.u_modulesListBox.Items.Add(kvp.Value);
                PanelGenericSettings setting = new PanelGenericSettings(cin, kvp.Value, m_moduleDictionaries[i], u_applyButton);
                this.AddPanel(setting, cin);
                i++;
            }
            this.u_modulesListBox.SelectedIndex = 0;
        }