private void buttonOK_Click(object sender, EventArgs e) { String channelName = textBoxChannel.Text.Trim(); if (channelName.Length > 0) { ShardDb.insertChannel(channelName); this.Close(); } else { MessageBox.Show("请输入渠道名称"); textBoxChannel.Focus(); } }