private void BtnStart_OnClick(object sender, RoutedEventArgs e) { ServerCore server = ServerCore.InicilizeServer(int.Parse(NumPort.Value.ToString())); server.Error -= MessageOnError; server.Error += MessageOnError; server.ServerStart -= OpenPageServer; server.ServerStart += OpenPageServer; server.Start(); }