/// <summary> /// /// </summary> /// <param name="context"></param> /// <param name="provider"></param> /// <param name="value"></param> /// <returns></returns> public override System.Object EditValue( System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, System.Object value) { if (value is ConnectionType) { ConnectionType type = value as ConnectionType; if (ConnectionStringUIDialog.ShowDialog(ref type) == DialogResult.OK) { return(type); } else { return(value); } } else { string strConnectionString = (value == null) ? "" : value.ToString(); if (ConnectionStringUIDialog.ShowDialog(ref strConnectionString) == DialogResult.OK) { return(strConnectionString); } else { return(value); } } }
/// <summary> /// /// </summary> /// <param name="context"></param> /// <param name="provider"></param> /// <param name="value"></param> /// <returns></returns> public override System.Object EditValue( System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, System.Object value) { ConnectionType connectionType = value as ConnectionType; if (ConnectionStringUIDialog.ShowDialog(ref connectionType) == DialogResult.OK) { return(connectionType); } else { return(value); } }
/// <summary> /// /// </summary> /// <returns></returns> public virtual DialogResult ShowDialog() { return(ConnectionStringUIDialog.ShowDialog(ref mstrConnectionString)); }