/// <summary> /// </summary> /// <param name="cmd"></param> public void AddChooserCommand(ChooserCommand cmd) { CheckDisposed(); ChooserCommandNode node = new ChooserCommandNode(cmd); string sFontName = cmd.Cache.LangProject.DefaultAnalysisWritingSystemFont; // TODO: need to get analysis font's size // and then set it to use underline: Font font = new Font(sFontName, 10.0f, FontStyle.Italic); node.NodeFont = font; //node.ForeColor = Color.DarkGreen; m_labelsTreeView.Nodes.Insert(0, node); }
private void HandleCommmandChoice(ChooserCommandNode node) { if (node != null) { ChooserCommand cmd = node.Tag as ChooserCommand; if (cmd != null) { if (cmd.ShouldCloseBeforeExecuting) this.Visible = false; m_chosenLabel = cmd.Execute(); } } }