protected override void OnNewSession(MsgSessionInfo msg)
 {
     base.OnNewSession(msg);
     this.form.BeginInvoke(new Action<MsgSessionInfo>(this.form.SetSessionInfo), msg);
     this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
 }
Beispiel #2
0
 protected internal virtual void OnSessionInfo(MsgSessionInfo msg)
 {
 }
Beispiel #3
0
 protected override void OnSessionInfo(MsgSessionInfo msg)
 {
     Console.WriteLine("SessionInfo: " + msg.ServerName + ", " + msg.Name + ", " + msg.ElapsedMS + ", index = " + msg.CurrentSessionIndex + ",  WaitTime = " + msg.WaitTime);
     last = msg;
 }
Beispiel #4
0
 protected override void OnNewSession(MsgSessionInfo msg)
 {
     if (this.PluginManager.PreviousSession != null
         && this.BroadcastResults > 0
         && (this.PluginManager.PreviousSession.Laps.Count > 0 || this.PluginManager.PreviousSession.Incidents.Count > 0))
     {
         this.PluginManager.BroadcastChatMessage(this.PluginManager.PreviousSession.SessionName + " Results:");
         this.PluginManager.BroadcastChatMessage("Pos  Name\tCar\tGap\tBestLap\tIncidents");
         foreach (DriverInfo d in this.PluginManager.PreviousSession.Drivers.OrderBy(d => d.Position).Take(this.BroadcastResults))
         {
             this.PluginManager.BroadcastChatMessage(
                 string.Format(
                     "{0}   {1}\t{2}\t{3}\t{4}\t{5}",
                     d.Position.ToString("00"),
                     (d.DriverName == null || d.DriverName.Length <= 10) ? d.DriverName : d.DriverName.Substring(0, 10),
                     (d.CarModel == null || d.CarModel.Length <= 10) ? d.CarModel : d.CarModel.Substring(0, 10),
                     d.Gap,
                     AcServerPluginManager.FormatTimespan((int)d.BestLap),
                     d.Incidents));
         }
     }
 }
Beispiel #5
0
 protected override void OnSessionInfo(MsgSessionInfo msg)
 {
     if (msg.Type == ACSProtocol.MessageType.ACSP_NEW_SESSION || CurrentSessionGuid == Guid.Empty)
         OnNewSession(msg);
 }
Beispiel #6
0
        protected override void OnNewSession(MsgSessionInfo msg)
        {
            PluginManager.Log("===============================");
            PluginManager.Log("===============================");
            PluginManager.Log("OnNewSession: " + msg.Name + "@" + msg.ServerName);
            PluginManager.Log("===============================");
            PluginManager.Log("===============================");

            CurrentSessionGuid = LiveDataServer.NewSession(CurrentSessionGuid, msg.ServerName, msg.Track + "[" + msg.TrackConfig + "]"
                , msg.SessionType, msg.Laps, msg.WaitTime, msg.SessionDuration, msg.AmbientTemp, msg.RoadTemp, msg.ElapsedMS
                , TrustToken, _fingerprint, PluginVersion, -1, -1, -1);
            for (byte i = 0; i < 36; i++)
                PluginManager.RequestCarInfo(i);

            CurrentSessionStartTime = msg.CreationDate.AddMilliseconds(msg.ElapsedMS*-1);

            _distancesToReport.Clear();
        }