/// <summary> /// Generates an animation /// </summary> private void OnGenerateAnimation( ) { if ( m_View.Model == null ) { return; } m_View.GenerationEnabled = false; DelegateWorkItem.Builder builder = new DelegateWorkItem.Builder( ); builder.SetDoWork( GenerateAnimationWorker, m_View.Model.Clone( ) ); builder.SetWorkComplete( OnWorkComplete ); builder.SetWorkFailed( OnWorkFailed ); m_WorkQueue.Enqueue( builder.Build( ), this ); }
/// <summary> /// Adds a work item to build the current texture /// </summary> private void AddWorkItem( ) { DelegateWorkItem.Builder work = new DelegateWorkItem.Builder( ); work.SetDoWork( GenerateBitmaps ); work.SetWorkComplete( OnGenerateBitmapsComplete ); m_WorkQueue.Enqueue( work.Build( "Cloud generation work item" ), null ); }