public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
 {
     if (destinationType == typeof(System.String) &&
         value is HelpSetting)
     {
         HelpSetting hs = (HelpSetting )value;
         return(hs.KeyWord);
     }
     return(base.ConvertTo(context, culture, value, destinationType));
 }
 public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
 {
     if (value is string)
     {
         string      s  = (string)value;
         HelpSetting hs = ((Report)context.Instance).HelpInfo;
         hs.KeyWord = s;
         return(hs);
     }
     return(base.ConvertFrom(context, culture, value));
 }
Ejemplo n.º 3
0
 public HelpSetting(HelpSetting hs)
 {
     _filename = hs.FileName;
     _keyword  = hs.KeyWord;
     _keyindex = hs.KeyIndex;
 }