private void btnStop_Click(object sender, EventArgs e) { SetAppState(AppState.Stoping); // 停止服务 AddMsg("$Server Stop"); if (server.Stop()) { this.Text = title; SetAppState(AppState.Stoped); } else { AddMsg(string.Format("$Stop Error -> {0}({1})", server.ErrorMessage, server.ErrorCode)); } }
private Boolean ServiceStop() { SetAppState(AppState.Stoping); // 停止服务 AddMsg("$Server Stop"); if (server.Stop()) { SetAppState(AppState.Stoped); } else { AddMsg(string.Format("$Stop Error -> {0}({1})", server.ErrorMessage, server.ErrorCode)); } return(true); }
private void buttonStop_Click(object sender, EventArgs e) { appState = AppState.Stopping; server.Stop(); }