Exemple #1
0
        public RadKey()
        {
            InitializeComponent();

            // Initialize OS-specific components.
            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                Windows_InitializeComponent();
                restoreHotkey = Windows_CreateRestoreHotkey();
            }
            else
            {
                Linux_InitializeComponent();
            }

            KanjiDictionary kanjiDictionary = new KanjiDictionary("kanjidic"); //loadKanjiDic(); // Making this non-static would mean KanjiData would need to store a static reference to it for sorting?

            Compound.SetKanjiDictionary(kanjiDictionary);

            KanjiToRadicalDictionary kanjiToRadicalDictionary = new KanjiToRadicalDictionary("kradfile");

            SelectionInfoHandler.SetKanjiToRadicalDictionary(kanjiToRadicalDictionary, kanjiDictionary);
            TextConverter.SetKanjiToRadicalDictionary(kanjiToRadicalDictionary);

            kanjiSearchManager = new KanjiSearchHandler(
                new KanjiSearch(
                    new RadkfileDictionary("radkfile")), kanjiDictionary);

            compoundSearchHandler = new CompoundSearchHandler(
                new CompoundSearch(
                    new CompoundDictionary("JMdict_e"), kanjiToRadicalDictionary));



            messageBox.Text = NameToRadicalDictionary.Load(radicalNameFile) + Environment.NewLine + messageBox.Text;
        }
Exemple #2
0
 private void compoundsResults_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectionInfoHandler.ShowCompoundSelectionInfo((Compound)compoundsResults.SelectedItem, meaningBox, readingBox);
 }
Exemple #3
0
 private void resultList_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectionInfoHandler.ShowKanjiSelectionInfo(resultList.Text, messageBox, readingBox, meaningBox);
 }