public void ItemSelectLexEdit() { bool enable = m_selected.Count == 1 && m_selected[0].NumChildren() == 0; lexEditGroupBox.Enabled = enable; if (enable) { if (m_selected[0].NumChildren() == 0) { triangleCheckBox.Checked = m_selected[0].GetNode().GetDisplayType() == NodeDisplayType.Triangle; //lexEditRichEditBox.Reset(); lexEditRichEditBox.Rtf = m_selected[0].GetNode().GetLexicalRtf(); if (lexEditRichEditBox.TextLength == 0) { lexEditRichEditBox.SelectAll(); lexEditRichEditBox.SelectionColor = m_stv.GetCurrentOptions().lexicalfont.Color; lexEditRichEditBox.SelectionFont = m_stv.GetCurrentOptions().lexicalfont.Font; } lexEditRichEditBox.Modified = false; } } else { triangleCheckBox.Checked = false; } }
public void ItemSelectNodeEdit(bool refocus) { bool enable; enable = m_selected.Count == 1; labelEditGroupBox.Enabled = enable; if (enable) { //labelEditRichEditBox.Reset(); labelEditRichEditBox.Rtf = m_selected[0].GetNode().GetLabelRtf(); if (labelEditRichEditBox.TextLength == 0) { labelEditRichEditBox.SelectAll(); labelEditRichEditBox.SelectionColor = m_stv.GetCurrentOptions().labelfont.Color; labelEditRichEditBox.SelectionFont = m_stv.GetCurrentOptions().labelfont.Font; } labelEditRichEditBox.Modified = false; if (refocus) { labelEditRichEditBox.Focus(); } labelEditRichEditBox.SelectAll(); } }