예제 #1
0
        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;
        }
예제 #2
0
 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;
         }
     }
 }
예제 #3
0
 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 - ";
     }
 }
예제 #4
0
 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 - ";
     }
 }
예제 #5
0
 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;
 }
예제 #6
0
 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; 
         }
     }
 }