Example #1
0
		public void EffectAdd(Effect cEffect, float nSpeed)
		{
			if (null == OnEffectAdd)
				throw new Exception("shared:roll:effect:add: отсутствует привязка к серверу объектов [hc:" + GetHashCode() + "]");
			try
			{
				OnEffectAdd(this, cEffect, nSpeed);
			}
			catch (Exception ex)
			{
				(new Logger()).WriteError(ex);
			}
		}
Example #2
0
		public void EffectAdd(Effect cEffect)
		{
			EffectAdd(cEffect, float.MaxValue);
		}
Example #3
0
 public void PLItemDelete(Effect[] aEffectIDs)
 {
     if (null == OnPLItemDelete)
         throw new Exception("shared:playlist:items_delete: отсутствует привязка к серверу объектов [hc:" + GetHashCode() + "]");
     OnPLItemDelete(this, aEffectIDs);
 }
Example #4
0
		public void Skip(bool bLast, ushort nNewTransDur, Effect cEffect)
		{
			if (null == OnSkip)
				throw new Exception("shared:playlist:skip: отсутствует привязка к серверу объектов [hc:" + GetHashCode() + "]");
			OnSkip(this, bLast, nNewTransDur, cEffect);
		}
Example #5
0
		public void EffectAdd(Effect cEffect, ushort nTransDur)
        {
			if (null == OnAddEffect)
				throw new Exception("shared:playlist:effect:add: не удалось добавить эффект в плейлист [hc:" + GetHashCode() + "]");
			OnAddEffect(this, cEffect, nTransDur);
		}
Example #6
0
		public void OnContainerEventRaised(ContainerEventType eType, Effect cEffect)
		{
			if (null != ContainerEventRaised)
			{
				(new Logger()).WriteDebug4("shared:container:event:" + eType.ToString() + ":before [effect hc:" + cEffect.GetHashCode() + "][container hc:" + GetHashCode() + "]");
				try
				{
					ContainerEventRaised(eType, cEffect);
				}
				catch (System.Net.Sockets.SocketException)
				{
					(new Logger()).WriteDebug4("shared:container:client:lost:dispose:before [effect hc:" + cEffect.GetHashCode() + "][container hc:" + GetHashCode() + "]");
					Stop();
					Dispose();
					(new Logger()).WriteDebug4("shared:container:client:lost:dispose:after [effect hc:" + cEffect.GetHashCode() + "][container hc:" + GetHashCode() + "]");
				}
				catch (Exception ex)
				{
					(new Logger()).WriteError(ex);
				}
                (new Logger()).WriteDebug4("shared:container:event:" + eType.ToString() + ":after [effect hc:" + cEffect.GetHashCode() + "][container hc:" + GetHashCode() + "]");
			}
			else
				(new Logger()).WriteDebug4("shared:container:event:" + eType.ToString() + ":empty [effect hc:" + cEffect.GetHashCode() + "][container hc:" + GetHashCode() + "]");
		}