private void typeMarker_TextAccepted(object sender, TypeMarkerEventArgs e) { var item = SetTypeAtAddressRange(GetSelectedAddressRange().Begin, e.UserText); if (item == null) { return; } // Advance selection to beyond item. this.SelectedAddress = item.Address + item.Size; }
void text_TextChanged(object sender, EventArgs e) { if (TextChanged != null) { var ee = new TypeMarkerEventArgs(text.Text); TextChanged(this, ee); var formattedText = ee.FormattedType; if (formattedText.Length > 0) { label.ForeColor = SystemColors.ControlText; label.Text = ee.FormattedType; } else { label.ForeColor = SystemColors.GrayText; label.Text = TypeMarkerEnterType; } } }
public void typeMarker_FormatType(object sender, TypeMarkerEventArgs e) { try { var parser = new HungarianParser(); var dataType = parser.Parse(e.UserText); if (dataType == null) { e.FormattedType = " - Null - "; } else { e.FormattedType = dataType.ToString(); } } catch { e.FormattedType = " - Error - "; } }
public void typeMarker_FormatType(object sender, TypeMarkerEventArgs e) { try { var parser = new HungarianParser(); var dataType = parser.Parse(e.UserText); if (dataType == null) e.FormattedType = " - Null - "; else e.FormattedType = dataType.ToString(); } catch { e.FormattedType = " - Error - "; } }
private void typeMarker_TextAccepted(object sender, TypeMarkerEventArgs e) { var item = SetTypeAtAddressRange(GetSelectedAddressRange().Begin, e.UserText); if (item == null) return; // Advance selection to beyond item. this.SelectedAddress = item.Address + item.Size; }