예제 #1
0
 ///<summary>Raises the SimConnected Event</summary>
 /// <param name="e">A SimConnectedEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnSimDiscovered(SimDiscoveredEventArgs e)
 {
     EventHandler<SimDiscoveredEventArgs> handler = m_SimDiscovered;
     if (handler != null)
         handler(this, e);
 }
예제 #2
0
        void Network_SimDiscovered(object sender, SimDiscoveredEventArgs e)
        {
            Logger.Log("*** Sim Discovered " + e.Simulator.Handle + " " + e.Simulator.Name, Helpers.LogLevel.Info);

            ThreadPool.QueueUserWorkItem(sync =>
            {
                Dictionary<string, string> parameters = new Dictionary<string, string>();
                Dictionary<string, string> conditions = new Dictionary<string, string>();
                parameters.Add("Grid", MainClass.db.gridKey.ToString());
                parameters.Add("Handle", e.Simulator.Handle.ToString());
                parameters.Add("Name", e.Simulator.Name);
                parameters.Add("Owner", MainClass.db.compressUUID(e.Simulator.SimOwner));

                MainClass.db.genericInsertIgnore("Region", parameters);
            });

        }