File tree Expand file tree Collapse file tree
MapWinGisTests-net/WinFormsApp1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ public Form1()
1414 CallbackVerbosity = tkCallbackVerbosity . cvAll
1515 } ;
1616
17- // Test with Showing form for x86 and x64
18- //if(Environment.Is64BitProcess)
17+ if ( ! IsRunningOnGitHubActions )
1918 {
20- Shown += ( s , e ) => LoadOsm ( ) ; // This need to be done after the form is shown (x64)
19+ // Don't call LoadOsm() when running on GitHub Actions.
20+ Shown += ( s , e ) => LoadOsm ( ) ; // This need to be done after the form is shown (x64)
2121 }
2222 /*else
2323 {
@@ -27,7 +27,15 @@ public Form1()
2727 GetMapWinGisVersion ( ) ;
2828 }
2929
30- private void AxMap1_FileDropped ( object sender , _DMapEvents_FileDroppedEvent e )
30+
31+ internal static bool IsRunningOnGitHubActions =>
32+ string . Equals (
33+ Environment . GetEnvironmentVariable ( "GITHUB_ACTIONS" ) ,
34+ "true" ,
35+ StringComparison . OrdinalIgnoreCase ) ;
36+
37+
38+ private void AxMap1_FileDropped ( object sender , _DMapEvents_FileDroppedEvent e )
3139 {
3240 TxtProgress . Text += $@ "Opening { e . filename } after dropping.{ Environment . NewLine } ";
3341 axMap1 . AddLayerFromFilename ( e . filename , tkFileOpenStrategy . fosAutoDetect , true ) ;
You can’t perform that action at this time.
0 commit comments