private SetCurrentSim ( Simulator simulator, string seedcaps ) : void | ||
simulator | Simulator | |
seedcaps | string | |
리턴 | void |
private void SetCurrentSim(Simulator simulator, string seedcaps)
{
if (simulator != CurrentSim)
{
Simulator oldSim = CurrentSim;
lock (Simulators) CurrentSim = simulator; // CurrentSim is synchronized against Simulators
simulator.SetSeedCaps(seedcaps);
// If the current simulator changed fire the callback
if (OnCurrentSimChanged != null && simulator != oldSim)
{
try { OnCurrentSimChanged(oldSim); }
catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
}
}
}