示例#1
0
 protected override void OnClientLoaded(MsgClientLoaded msg)
 {
     //using (var a = new FileStream("Test.txt", FileMode.Append, FileAccess.Write))
     //using (var b = new StreamWriter(a))
     //{
     //    b.WriteLine($"{DateTime.Now.TimeOfDay}: OnClientLoaded Called {msg.CarId}");
     //}
 }
示例#2
0
 public override void OnClientLoaded(MsgClientLoaded msg)
 {
     // Sending conditions directly to all newly connected:
     if (_weatherCurrent != null && _weatherNext != null)
     {
         PluginManager.SendCspCommand(msg.CarId, GetSerializedCspCommand(_weatherCurrent, _weatherNext));
     }
 }
示例#3
0
        protected override void OnClientLoaded(MsgClientLoaded msg)
        {
            DriverInfo driverReport;

            if (this.PluginManager.TryGetDriverInfo(msg.CarId, out driverReport))
            {
                driverReport.ConnectedTimestamp = DateTime.UtcNow.Ticks;
                string welcome = CreateWelcomeMessage(driverReport);
                if (!string.IsNullOrWhiteSpace(welcome))
                {
                    foreach (string line in welcome.Split('|'))
                    {
                        this.PluginManager.SendChatMessage(msg.CarId, line);
                    }
                }
            }
        }
示例#4
0
 public virtual void OnClientLoaded(MsgClientLoaded msg)
 {
 }
示例#5
0
 protected override void OnClientLoaded(MsgClientLoaded msg)
 {
     MRBackend.RequestDriverLoadedAsync(msg.CarId);
 }
 public override void OnClientLoaded(MsgClientLoaded msg)
 {
     // Sending conditions directly to all newly connected:
     PluginManager.SendCspCommand(msg.CarId, GetCspCommand());
 }
示例#7
0
 protected override void OnClientLoaded(MsgClientLoaded msg)
 {
     base.OnClientLoaded(msg);
     this.form.BeginInvoke(new Action(this.form.UpdateGui), null);
     this.form.BeginInvoke(new Action <MsgClientLoaded>(this.form.OnClientLoadedG), msg);
 }
        public void OnClientLoadedG(MsgClientLoaded msg)
        {
            DriverInfo Driver = this.pluginManager.GetDriverInfos().Where(d => msg.CarId == d.CarId).First();

            listBox_LastConnectedGUID.Items.Add(Driver.DriverGuid + ": " + Driver.DriverName);
        }
示例#9
0
 protected internal virtual void OnClientLoaded(MsgClientLoaded msg)
 {
 }