소스 검색

if there is not safe path the application will now show a message instead of crashing

winforms
benjamin.m 5 년 전
부모
커밋
77b208ce7b
1개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 8
    5
      Buhnenrennen/GraphicGenerator.cs

+ 8
- 5
Buhnenrennen/GraphicGenerator.cs 파일 보기

@@ -121,12 +121,15 @@ namespace Buhnenrennen
}

TimedGroyne safePathSub = safePath;

do
if ( safePath != null )
{
graphics.ConnectRectangles( new Pen( safePathBrush, borderWidth ), groynePositions[ safePathSub.Groyne ], groynePositions[ safePathSub.ParentGroyne.Groyne ], borderWidth );
safePathSub = safePathSub.ParentGroyne;
} while ( safePathSub.ParentGroyne != null );
do
{
graphics.ConnectRectangles( new Pen( safePathBrush, borderWidth ), groynePositions[ safePathSub.Groyne ], groynePositions[ safePathSub.ParentGroyne.Groyne ], borderWidth );
safePathSub = safePathSub.ParentGroyne;
} while ( safePathSub.ParentGroyne != null );
}
else ColorMessageBox.Show( "Das gegebene Scenario enthält keine sichere Route für Minnie" );

foreach( var groyne in groyneBorderBrush.Keys )
{

Loading…
취소
저장