public MeditationToolbox(AnimatedPaint_IContainer animatedPaint_iContainer) { var stopFilename = UtilsIO.GetFileFromThisAppDirectory(Settings.Default.StopMp3Filename); MeditateOnStop = new InvokeAtRandomIntervals( TimeSpan.FromSeconds(Settings.Default.StopMedMinSec), TimeSpan.FromSeconds(Settings.Default.StopMedMaxSec), () => { playa = new AudioPlaya(stopFilename); playa.Play(); playa.Finished += (playaDone) => { playaDone.Dispose(); playaDone = null; }; }); MeditateOnStopQuicker = new InvokeAtRandomIntervals( TimeSpan.FromSeconds(Settings.Default.StopMed2MinSec), TimeSpan.FromSeconds(Settings.Default.StopMed2MaxSec), () => { playa = new AudioPlaya(stopFilename); playa.Play(); playa.Finished += (playaDone) => { playaDone.Dispose(); playaDone = null; }; }); CurAnimation = new AnimatedPaintThread(animatedPaint_iContainer) { DelayMs = Settings.Default.AnimationsDelay, }; }
public MeditationToolbox(AnimatedPaint_IContainer animatedPaint_iContainer) { var stopFilename = UtilsIO.GetFileFromThisAppDirectory(Settings.Default.StopMp3Filename); MeditateOnStop = new InvokeAtRandomIntervals( TimeSpan.FromSeconds(Settings.Default.StopMedMinSec), TimeSpan.FromSeconds(Settings.Default.StopMedMaxSec), () => { playa = new AudioPlaya(stopFilename); playa.Play(); playa.Finished += (playaDone) => { playaDone.Dispose(); playaDone = null; }; }); MeditateOnStopQuicker = new InvokeAtRandomIntervals( TimeSpan.FromSeconds(Settings.Default.StopMed2MinSec), TimeSpan.FromSeconds(Settings.Default.StopMed2MaxSec), () => { playa = new AudioPlaya(stopFilename); playa.Play(); playa.Finished += (playaDone) => { playaDone.Dispose(); playaDone = null; }; }); CurAnimation = new AnimatedPaintThread(animatedPaint_iContainer) { DelayMs = Settings.Default.AnimationsDelay, }; }
public AnimatedPaintThread(AnimatedPaint_IContainer iContainer) { this.iContainer = iContainer; DelayMs = DELAY_DEFAULT; stopCalled = false; }