public override void unloadData() { log("Unloading", "unloadData"); GridEnforcer.OnPlacementViolation -= eventPlacementViolation; GridEnforcer.OnCleanupViolation -= eventCleanupViolation; GridEnforcer.OnCleanupTimerStart -= eventCleanupTimerStart; GridEnforcer.OnCleanupTimerEnd -= eventCleanupTimerEnd; ControlPoint.OnRewardsDistributed -= notifyPlayersOfCPResults; if (m_LocalReceiver != null) { m_MailMan.localMsgSent -= m_LocalReceiver.incomming; m_LocalReceiver.unload(); m_LocalReceiver = null; } m_MailMan.unload(); if (!MyAPIGateway.Utilities.IsDedicated) { m_CmdProc.shutdown(); } m_RoundTimer.Dispose(); m_RoundTimer = null; m_SaveTimer.Dispose(); m_SaveTimer = null; s_Logger = null; }
public void Dispose() { if (m_timer != null) { lock (m_timer) { Packet packet; while (m_receiveQueue.Count > 0) { if (m_receiveQueue.TryDequeue(out packet)) { packet.Delete(); } } m_timer.Dispose(); m_timer = null; m_timerAction = null; } } if (!m_peer.IsNull) { m_peer.Shutdown(300); m_peer.Delete(); } GC.SuppressFinalize(this); }
/// <summary> /// Cancels the dereliction timer /// </summary> /// <returns>False if there was no timer to cancel</returns> public bool cancel() { if (m_Timer == null) { return(false); } StateTracker.getInstance().removeDerelictTimer(m_TimerInfo.GridID); m_Timer.Dispose(); m_Timer = null; m_TimerInfo = null; TimerExpired = false; log("Timer cancelled", "cancel"); return(true); }
private void Reiniciar() { Conteo = 0; id = 0; CantCort = 0; CantLar = 0; HoraTextBox.Clear(); DiasTextBox.Clear(); PrecioTextBox.Clear(); CantidadTextBox.Clear(); TipoTextBox.Clear(); VendidosDataGridView.DataSource = null; CantidadCortosTextBox.Clear(); CantidadLargosTextBox.Clear(); DineroCortosTextBox.Clear(); DineroLargosTextBox.Clear(); MyTimer.Dispose(); }
public void Dispose() { Disposed = true; if (ReadMode == Mode.Spin) { m_readThread.Join(); } else if (ReadMode == Mode.Timer) { lock (m_timer) { m_timer.Dispose(); m_timerAction = null; } } GC.SuppressFinalize(this); }
public void ActualizaClienteSignal(object sender, System.Timers.ElapsedEventArgs e) { var objcomun = new comun(); using (var db = new bdloginEntities()) { MyTimer timer = (MyTimer)sender; int idlocal = timer.idlocal; string urlDownload = timer.urlDownload; var parametro = db.bingoParametro.Where(p => p.idLocal == idlocal).SingleOrDefault(); if (parametro.apagarCliente) { timer.Stop(); timer.Close(); timer.Dispose(); } if (parametro != null) { //if (objcomun.ActualizaCliente(idlocal)) //{ if ((!parametro.videoActivo) && (parametro.visualizar == "video")) { var salida = objcomun.ClientDownload(1, urlDownload); var context = GlobalHost.ConnectionManager.GetHubContext <signal>(); context.Clients.All.broadcastMessage(salida + DateTime.Now); } if (parametro.visualizar == "bingo") { var salida = objcomun.ClientDownload(1, urlDownload); var context = GlobalHost.ConnectionManager.GetHubContext <signal>(); context.Clients.All.broadcastMessage(salida + DateTime.Now); } //} } } }
public void Dispose() { MyTimer.Dispose(); }