Beispiel #1
0
        public virtual void OnExportAttemptCompleted( string identifier, bool isSuccess, int? rockId = null, Type mapType = null )
        {
            ExportMapEventArgs args = new ExportMapEventArgs();

            if ( mapType == null )
            {
                args.MapType = this.GetType();
            }
            else
            {
                args.MapType = mapType; 
            }

            args.Identifier = identifier;
            args.RockIdentifier = rockId;
            args.IsSuccess = isSuccess;

            EventHandler<ExportMapEventArgs> handler = ExportAttemptCompleted;

            if ( handler != null )
            {
                handler( this, args );
            }
        }
 void Component_ExportAttemptCompleted( object sender, ExportMapEventArgs e )
 {
     if ( e.IsSuccess )
     {
         successCount++;
     }
     else
     {
         failureCount++;
     }
 }
        void Component_ExportAttemptCompleted( object sender, ExportMapEventArgs e )
        {
            ExportMap map = SelectedMaps.Where( m => m.Component.GetType() == e.MapType ).FirstOrDefault();
            if ( e.IsSuccess )
            {

                map.Component.SuccessCount++;

            }
            else
            {
                map.Component.FailCount++;
            }
        }