Bläddra i källkod

fixed icon ( linux could not load compressed icons )

lowered size of generated image ( in linux the application crashed for bigger scenarios )
added warning if "setups" directory is missing ( otherwise application would crash )
winforms
DragonSkills99 5 år sedan
förälder
incheckning
b13a456094

+ 22
- 0
Buhnenrennen.sln Visa fil

@@ -22,4 +22,26 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EF974075-C6B0-4BEA-B005-A1DA861E2655}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = PrefixedHierarchical
$0.TextStylePolicy = $2
$2.inheritsSet = null
$2.scope = text/x-csharp
$0.CSharpFormattingPolicy = $3
$3.SpaceWithinMethodDeclarationParenthesis = True
$3.SpaceWithinMethodCallParentheses = True
$3.SpaceWithinExpressionParentheses = True
$3.SpaceWithinCastParentheses = True
$3.SpaceWithinOtherParentheses = True
$3.SpaceAfterCast = True
$3.SpaceWithinSquareBrackets = True
$3.scope = text/x-csharp
$0.TextStylePolicy = $4
$4.FileWidth = 80
$4.TabsToSpaces = True
$4.scope = text/plain
$0.StandardHeader = $5
EndGlobalSection
EndGlobal

+ 5
- 2
Buhnenrennen/Buhnenrennen.csproj Visa fil

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -14,7 +14,6 @@
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
@@ -22,6 +21,9 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>Default</LangVersion>
<NoStdLib>false</NoStdLib>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -31,6 +33,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup>
<StartupObject />

+ 2
- 1
Buhnenrennen/Field.cs Visa fil

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
@@ -24,7 +25,7 @@ namespace Buhnenrennen
char type = matchedGroyne.Groups[ "type" ].Value.FirstOrDefault();
// Forcing a multiple of 70 by using '/ 70 * 70'
int level = int.Parse( matchedGroyne.Groups[ "level" ].Value ) / 70 * 70;
double yCoord = double.Parse( matchedGroyne.Groups[ "yCoord" ].Value.Replace( ",", "" ).Replace( ".", "," ) );
double yCoord = double.Parse( matchedGroyne.Groups[ "yCoord" ].Value, CultureInfo.InvariantCulture );
if ( !this.Groynes.ContainsKey( level ) ) this.Groynes.Add( level, new List<Groyne>() );
this.Groynes[ level ].Add( new Groyne( yCoord, type ) );
}

+ 7
- 7
Buhnenrennen/GraphicGenerator.cs Visa fil

@@ -21,20 +21,20 @@ namespace Buhnenrennen
{
TimedGroyne safePath = field.getFastestSafeRoute( Dog.MAX, Dog.MINNIE, out var hunterMap, out var huntedMap );

float borderWidth = 7.5F;
int boxRadius = 25;
Size imagePadding = new Size( 10, 10 );
float borderWidth = 3.75F;
int boxRadius = 12;
Size imagePadding = new Size( 5, 5 );
Size imageSize = new Size( imagePadding.Width, imagePadding.Height );
Font font = new Font( "Consolas", 30F );
Font nameFont = new Font( "Consolas", 50F );
Font font = new Font( "Consolas", 15F );
Font nameFont = new Font( "Consolas", 25F );
Brush hunterBrush = new SolidBrush( Color.DarkRed );
Brush hunterFillBrush = new SolidBrush( Color.Red );
Brush huntedBrush = new SolidBrush( Color.DarkBlue );
Brush huntedFillBrush = new SolidBrush( Color.Cyan );
Brush safePathBrush = new SolidBrush( Color.Gold );

Size boxSpacing = new Size( 700, 50 );
Size boxSize = new Size( 300, 200 );
Size boxSpacing = new Size( 350, 25 );
Size boxSize = new Size( 150, 100 );
int levels = ( ( int ) field.Groynes.Keys.Max() / 70 ) + 1; // + 1 cause 0 is also a level and hasn't been included yet

imageSize.Width += boxSize.Width * levels;

+ 7
- 0
Buhnenrennen/Scripter.cs Visa fil

@@ -28,6 +28,13 @@ namespace Buhnenrennen
/// </summary>
private void Scripter_Load( object sender, EventArgs e )
{
if ( !Directory.Exists( "setups" ) )
{
ColorMessageBox.Show( "Es wurden keine Setup-Dateien gefunden, bitte legt erst welche an und startet das Programm dann erneut." );
Application.Exit();
return;
}

var filenumbers_int = Directory.GetFiles( "setups", "buhnenrennen*.txt" )
.Select( Path.GetFileName )
.Where( file => setupFileRegex.IsMatch( file ) )

+ 7162
- 381
Buhnenrennen/Scripter.resx
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


Laddar…
Avbryt
Spara