internal void setSelectedPage(string stem, int pageNum) { Settings.app.setSelectedPage(stem, pageNum); if (mainForm != null && lastData != null && lastData.getMatchStem() == stem) { OkuriganaType okType = Settings.app.okuriganaType; if (okType == OkuriganaType.NORMAL) { mainForm.updateReading(lastData.getMatchStem(), lastData.getReading(okType)); } else if (okType == OkuriganaType.ENGLISH || okType == OkuriganaType.RUSSIAN) { mainForm.updateReading(lastData.asText(), lastData.getReading(okType)); } } }
internal void display(WordParseResult part, Point where, int anchorHeight) { if (!definitionsSent) { if (Edict.instance.getDefinitions() != null) { webBrowser1.callScript("setDefinitions", Utils.toJson(Edict.instance.getDefinitions())); definitionsSent = true; } } if (!nameDefinitionsSent) { if (Edict.instance.getNameDefinitions() != null) { webBrowser1.callScript("setNameDefinitions", Utils.toJson(Edict.instance.getNameDefinitions())); nameDefinitionsSent = true; } } lastData = part; webBrowser1.callScript("show", part.asJsonFull(), Settings.app.getSelectedPage(part.getMatchStem()), Settings.app.transparentMode, Settings.app.fontSize); this.Width = (int)(350 * Settings.app.fontSize / 100); Location = getRealPos(where.X, where.Y, anchorHeight); showNoActivate(); }
internal void display(WordParseResult part, Point where, int anchorHeight) { if (!definitionsSent) { if (Edict.instance.getDefinitions() != null) { webBrowser1.callScript("setDefinitions", Utils.toJson(Edict.instance.getDefinitions())); definitionsSent = true; } } if (!nameDefinitionsSent) { if (Edict.instance.getNameDefinitions() != null) { webBrowser1.callScript("setNameDefinitions", Utils.toJson(Edict.instance.getNameDefinitions())); nameDefinitionsSent = true; } } lastData = part; webBrowser1.callScript("show", part.asJsonFull(), Settings.app.getSelectedPage(part.getMatchStem()), Settings.app.transparentMode, Settings.app.fontSize); this.Width = (int)(350 * Settings.app.fontSize / 100); Location = getRealPos(where.X, where.Y, anchorHeight); showNoActivate(); }