public CommandTestForm(ConnectionContext connectionContext, QpCommandInfo qpCommandInfo = null) { this.connectionContext = connectionContext; InitializeComponent(); if (qpCommandInfo == null) { txtFormTitle.Text = $"{Text} - {connectionContext.ConnectionInfo.Name}"; } else { txtFormTitle.Text = $"{Text} - {qpCommandInfo.Name} - {connectionContext.ConnectionInfo.Name}"; txtTestRequest.Text = qpCommandInfo.RequestTypeSchemaSample; txtCommandRequestTypeName.Text = qpCommandInfo.RequestTypeName; } }
public CommandInfoControl(QpCommandInfo item) { this.item = item; InitializeComponent(); StringBuilder sb = new StringBuilder(); sb.AppendLine($"名称:{item.Name}"); sb.AppendLine($"请求类名称:{item.RequestTypeName}"); sb.AppendLine($"响应类名称:{item.ResponseTypeName}"); if (!string.IsNullOrEmpty(item.Description)) { sb.AppendLine("描述:"); sb.AppendLine("---------------------"); sb.AppendLine(item.Description); } txtBasic.Text = sb.ToString(); txtRequestSchema.Text = item.RequestTypeSchema; txtRequestSchemaSample.Text = item.RequestTypeSchemaSample; txtResponseSchema.Text = item.ResponseTypeSchema; txtResponseSchemaSample.Text = item.ResponseTypeSchemaSample; }