public void StartPhotos() // (просьба была стартовать каждую минуту) { Animation cLoop = null; if (_bStopping) { return; } _cPLPhotoLeft.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_imagesL_in")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); lock (_aLoops) { cLoop = new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_imagesL_loop")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = true, bOpacity = false, nLoopsQty = nLoopImages, oTag = "voting_imagesL_loop" }; _cPLPhotoLeft.AnimationAdd(cLoop, 0); _aLoops.Add(cLoop); } _cPLPhotoLeft.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_imagesL_out")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1, oTag = "voting_imagesL_out" }, 0); _cPLPhotoRight.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_imagesR_in")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); lock (_aLoops) { cLoop = new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_imagesR_loop")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = true, bOpacity = false, nLoopsQty = nLoopImages, oTag = "voting_imagesR_loop" }; _cPLPhotoRight.AnimationAdd(cLoop, 0); _aLoops.Add(cLoop); } _cPLPhotoRight.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_imagesR_out")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1, oTag = "voting_imagesR_out" }, 0); _dtPhotosLastStart = DateTime.Now; }
public void PreparePlaylists() { _bBlenderDidNewVotes = false; _bBlenderIsPreparing = false; _cPLMatTop = new btl.Playlist() { bCUDA = _cPreferences.bCUDA, nLayer = _cPreferences.nLayer, nDelay = 0, cDock = new Dock(_cPreferences.nLeft, (short)(_cPreferences.nTop + 67)), bStopOnEmpty = true, bOpacity = false }; _cPLMatMiddle = new btl.Playlist() { bCUDA = _cPreferences.bCUDA, nLayer = _cPreferences.nLayer, nDelay = 34, cDock = new Dock((short)(_cPreferences.nLeft + 186), (short)(_cPreferences.nTop + 87)), bStopOnEmpty = true, bOpacity = false }; _cPLMatBottom = new btl.Playlist() { bCUDA = _cPreferences.bCUDA, nLayer = _cPreferences.nLayer, nDelay = 22, cDock = new Dock(_cPreferences.nLeft, (short)(_cPreferences.nTop + 87)), bStopOnEmpty = true, bOpacity = false }; _cPLPhotoLeft = new btl.Playlist() { bCUDA = _cPreferences.bCUDA, nLayer = _cPreferences.nLayer, nDelay = 50, cDock = new Dock(_cPreferences.nLeft, _cPreferences.nTop), bStopOnEmpty = false, bOpacity = false }; _cPLPhotoRight = new btl.Playlist() { bCUDA = _cPreferences.bCUDA, nLayer = _cPreferences.nLayer, nDelay = 50, cDock = new Dock((short)(_cPreferences.nLeft + 253), _cPreferences.nTop), bStopOnEmpty = false, bOpacity = false }; Animation cLoop; _cPLMatTop.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_top_in")) { bCUDA = _cPreferences.bCUDA, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); cLoop = new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_top_loop1")) { bCUDA = _cPreferences.bCUDA, bKeepAlive = true, bOpacity = false, nLoopsQty = _nLoopTop, oTag = "voting_top_loop1" }; lock (_aLoops) _aLoops.Add(cLoop); _cPLMatTop.AnimationAdd(cLoop, 0); _cPLMatTop.EffectStarted += new ContainerVideoAudio.EventDelegate(_cPLMatTop_EffectStarted); _cPLMatTop.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLMatBottom.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_bot_in")) { bCUDA = _cPreferences.bCUDA, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); _cPLMatBottom.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_bot_loop")) { bCUDA = _cPreferences.bCUDA, bKeepAlive = true, bOpacity = false, nLoopsQty = 0 }, 0); _cPLMatMiddle.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderVotes, "voting_mid_in")) { bCUDA = _cPreferences.bCUDA, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); cLoop = new Animation(Path.Combine(_cPreferences.sFolderVotes, "voting_mid_loop1")) { bCUDA = _cPreferences.bCUDA, bKeepAlive = true, bOpacity = false, nLoopsQty = _nLoopMid, oTag = "voting_mid_loop1" }; _cPLMatMiddle.AnimationAdd(cLoop, 0); lock (_aLoops) _aLoops.Add(cLoop); _cPLMatMiddle.EffectStarted += new ContainerVideoAudio.EventDelegate(_cPLMatMiddle_EffectStarted); _cPLMatMiddle.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLMatTop.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLMatBottom.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLMatMiddle.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLPhotoLeft.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLPhotoRight.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLPhotoLeft.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLPhotoRight.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLMatTop.Prepare(); _cPLMatBottom.Prepare(); _cPLMatMiddle.Prepare(); _cPLPhotoLeft.Prepare(); _cPLPhotoRight.Prepare(); _cPLPhotoLeft.Start(); _cPLPhotoRight.Start(); (new Logger()).WriteDebug3("ok"); }
public void PreparePlaylists() { _bBlenderDidNewVotes = false; _bBlenderIsPreparing = false; _cPLMatTop = new btl.Playlist() { stMergingMethod = _cPreferences.stMerging, nLayer = _cPreferences.nLayer, nDelay = 0, cDock = new Dock(_cPreferences.nLeft, (short)(_cPreferences.nTop + 67)), bStopOnEmpty = true, bOpacity = false }; _cPLMatMiddle = new btl.Playlist() { stMergingMethod = _cPreferences.stMerging, nLayer = _cPreferences.nLayer, nDelay = 34, cDock = new Dock((short)(_cPreferences.nLeft + 186), (short)(_cPreferences.nTop + 87)), bStopOnEmpty = true, bOpacity = false }; _cPLMatBottom = new btl.Playlist() { stMergingMethod = _cPreferences.stMerging, nLayer = _cPreferences.nLayer, nDelay = 22, cDock = new Dock(_cPreferences.nLeft, (short)(_cPreferences.nTop + 87)), bStopOnEmpty = true, bOpacity = false }; _cPLPhotoLeft = new btl.Playlist() { stMergingMethod = _cPreferences.stMerging, nLayer = _cPreferences.nLayer, nDelay = 50, cDock = new Dock(_cPreferences.nLeft, _cPreferences.nTop), bStopOnEmpty = false, bOpacity = false }; _cPLPhotoRight = new btl.Playlist() { stMergingMethod = _cPreferences.stMerging, nLayer = _cPreferences.nLayer, nDelay = 50, cDock = new Dock((short)(_cPreferences.nLeft + 253), _cPreferences.nTop), bStopOnEmpty = false, bOpacity = false }; Animation cLoop; _cPLMatTop.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_top_in")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); cLoop = new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_top_loop1")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = true, bOpacity = false, nLoopsQty = _nLoopTop, oTag = "voting_top_loop1" }; lock (_aLoops) _aLoops.Add(cLoop); _cPLMatTop.AnimationAdd(cLoop, 0); _cPLMatTop.EffectStarted += new ContainerVideoAudio.EventDelegate(_cPLMatTop_EffectStarted); _cPLMatTop.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLMatBottom.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_bot_in")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); _cPLMatBottom.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderMat, "voting_bot_loop")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = true, bOpacity = false, nLoopsQty = 0 }, 0); _cPLMatMiddle.AnimationAdd(new Animation(Path.Combine(_cPreferences.sFolderVotes, "voting_mid_in")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = false, bOpacity = false, nLoopsQty = 1 }, 0); cLoop = new Animation(Path.Combine(_cPreferences.sFolderVotes, "voting_mid_loop1")) { stMergingMethod = _cPreferences.stMerging, bKeepAlive = true, bOpacity = false, nLoopsQty = _nLoopMid, oTag = "voting_mid_loop1" }; _cPLMatMiddle.AnimationAdd(cLoop, 0); lock (_aLoops) _aLoops.Add(cLoop); _cPLMatMiddle.EffectStarted += new ContainerVideoAudio.EventDelegate(_cPLMatMiddle_EffectStarted); _cPLMatMiddle.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLMatTop.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLMatBottom.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLMatMiddle.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLPhotoLeft.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLPhotoRight.Stopped += new Effect.EventDelegate(PL_Stopped); _cPLPhotoLeft.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLPhotoRight.EffectStopped += new ContainerVideoAudio.EventDelegate(RemoveOnStopped); _cPLMatTop.Prepare(); _cPLMatBottom.Prepare(); _cPLMatMiddle.Prepare(); _cPLPhotoLeft.Prepare(); _cPLPhotoRight.Prepare(); _cPLPhotoLeft.Start(); _cPLPhotoRight.Start(); (new Logger()).WriteDebug3("ok"); }