/// <summary> /// 服务端消息接收事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void WebSocket4Net_MessageReceived(object sender, MessageReceivedEventArgs e) { AutoUpdateManager autoUpdateManager = new AutoUpdateManager(); FileVersionInfo fv = FileVersionInfo.GetVersionInfo(Path.Combine(Application.StartupPath, autoUpdateManager.exeName)); if (fv.FileVersion.Equals(e.Message)) { string updateFileUri = ConfigurationManager.AppSettings["UpdateFileUri"]; autoUpdateManager.SilenceUpdate(updateFileUri); } }