Merge branch 'develop' of github.com:Flamefire/Vocaluxe into develop

This commit is contained in:
Florian Küpper committed 2013-04-29 08:12:03 +02:00
commit ed89a91ae5
28 files changed
+468 -340

No files matched your search

+3 -2
View File
@@ -20,6 +20,7 @@ Output/Songs
*.log *.log
/Output/Playlists/*.xml /Output/Playlists/*.xml
/Output/x64/gstreamer/GstreamerHelper.dll /Output/x64/gstreamer/GstreamerHelper.dll
/Output/x86/gstreamer/GstreamerHelper.dll
*.tlog *.tlog
*.suo *.suo
*.obj *.obj
@@ -35,6 +36,6 @@ Output/Songs
*.nativecodeanalysis* *.nativecodeanalysis*
*.lastcodeanalysissucceeded *.lastcodeanalysissucceeded
/PartyModes/*/*/*.dll /PartyModes/*/*/*.dll
*.Cache *.Cache
/Output/x86/gstreamer/GstreamerHelper.dll /GstreamerHelper/bin/*
/VocaluxeLib/bin
+33 -9
View File
@@ -39,14 +39,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
@@ -67,29 +67,35 @@
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>
<OutDir>..\Output\x86\gstreamer\</OutDir> </LinkIncremental>
<OutDir>bin\$(Configuration).$(Platform)\</OutDir>
<IncludePath>$(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath)</IncludePath> <IncludePath>$(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath)</IncludePath>
<LibraryPath>$(MSBuildProjectDirectory)\x86\lib;$(LibraryPath)</LibraryPath> <LibraryPath>$(MSBuildProjectDirectory)\x86\lib;$(LibraryPath)</LibraryPath>
<GenerateManifest>true</GenerateManifest>
<IntDir>obj\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>..\Output\x64\gstreamer\</OutDir> <OutDir>bin\$(Configuration).$(Platform)\</OutDir>
<IncludePath>$(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath)</IncludePath> <IncludePath>$(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath)</IncludePath>
<LibraryPath>$(MSBuildProjectDirectory)\x64\lib;$(LibraryPath)</LibraryPath> <LibraryPath>$(MSBuildProjectDirectory)\x64\lib;$(LibraryPath)</LibraryPath>
<CodeAnalysisRuleSet>..\CheckingRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<IntDir>obj\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>..\Output\x86\gstreamer\</OutDir> <OutDir>bin\$(Configuration).$(Platform)\</OutDir>
<IncludePath>$(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath)</IncludePath> <IncludePath>$(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath)</IncludePath>
<LibraryPath>$(MSBuildProjectDirectory)\x86\lib;$(LibraryPath)</LibraryPath> <LibraryPath>$(MSBuildProjectDirectory)\x86\lib;$(LibraryPath)</LibraryPath>
<IntDir>obj\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>..\Output\x64\gstreamer\</OutDir> <OutDir>bin\$(Configuration).$(Platform)\</OutDir>
<IncludePath>$(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath)</IncludePath> <IncludePath>$(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath)</IncludePath>
<LibraryPath>$(MSBuildProjectDirectory)\x64\lib;$(LibraryPath)</LibraryPath> <LibraryPath>$(MSBuildProjectDirectory)\x64\lib;$(LibraryPath)</LibraryPath>
<IntDir>obj\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\Output\x86</OutDir> <OutDir>..\Output\x86</OutDir>
@@ -111,6 +117,12 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent>
<Command>xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x86\gstreamer\" /I /Y</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying binary</Message>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|x64'">
<ClCompile> <ClCompile>
@@ -125,6 +137,9 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent>
<Command>xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x64\gstreamer\" /I /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'">
<ClCompile> <ClCompile>
@@ -138,12 +153,18 @@
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link> </Link>
<PostBuildEvent>
<Command>xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x86\gstreamer\" /I /Y</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying binary</Message>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|x64'">
<ClCompile> <ClCompile>
@@ -159,11 +180,14 @@
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent>
<Command>xcopy "$(OutDir)*.dll" "$(SolutionDir)Output\x64\gstreamer\" /I /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="GstreamerAudio.h" /> <ClInclude Include="GstreamerAudio.h" />
@@ -130,7 +130,8 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)Partymodes\ <PostBuildEvent>if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent> xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -19,6 +19,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
using VocaluxeLib.Menu.SongMenu; using VocaluxeLib.Menu.SongMenu;
@@ -504,7 +505,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
List<int> ids = new List<int>(); List<int> ids = new List<int>();
var visibleSongs = CBase.Songs.GetVisibleSongs(); ReadOnlyCollection<CSong> visibleSongs = CBase.Songs.GetVisibleSongs();
if (visibleSongs.Count == 0) if (visibleSongs.Count == 0)
{ {
CBase.Log.LogError("CPartyChallengeMedleyMode Error: There are no songs!"); CBase.Log.LogError("CPartyChallengeMedleyMode Error: There are no songs!");
@@ -130,7 +130,8 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)Partymodes\ <PostBuildEvent>if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent> xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -129,7 +129,8 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)Partymodes\ <PostBuildEvent>if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent> xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+4 -1
View File
@@ -9,7 +9,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SpecifyACultureInStringConversionExplicitly/@EntryIndexedValue">DO_NOT_SHOW</s:String> <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SpecifyACultureInStringConversionExplicitly/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEverywhere/@EntryIndexedValue">DO_NOT_SHOW</s:String> <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEverywhere/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String> <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Cleanup/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Cleanup"&gt;&lt;CSArrangeThisQualifier&gt;True&lt;/CSArrangeThisQualifier&gt;&lt;CSRemoveCodeRedundancies&gt;True&lt;/CSRemoveCodeRedundancies&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSUseVar&gt;&lt;BehavourStyle&gt;CAN_CHANGE_TO_EXPLICIT&lt;/BehavourStyle&gt;&lt;LocalVariableStyle&gt;ALWAYS_EXPLICIT&lt;/LocalVariableStyle&gt;&lt;ForeachVariableStyle&gt;ALWAYS_EXPLICIT&lt;/ForeachVariableStyle&gt;&lt;/CSUseVar&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;False&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;CSharpFormatDocComments&gt;True&lt;/CSharpFormatDocComments&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;False&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;False&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;False&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;False&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;False&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;False&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;StyleCop.Layout&gt;&lt;SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;False&lt;/SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;&lt;SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;True&lt;/SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;&lt;SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;True&lt;/SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;&lt;SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;True&lt;/SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;&lt;SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;True&lt;/SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;&lt;SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;False&lt;/SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;&lt;SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;False&lt;/SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;&lt;SA1515SingleLineCommentMustBeProceededByBlankLine&gt;False&lt;/SA1515SingleLineCommentMustBeProceededByBlankLine&gt;&lt;/StyleCop.Layout&gt;&lt;StyleCop.Readability&gt;&lt;SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;True&lt;/SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;&lt;SA1106CodeMustNotContainEmptyStatements&gt;True&lt;/SA1106CodeMustNotContainEmptyStatements&gt;&lt;SA1108BlockStatementsMustNotContainEmbeddedComments&gt;True&lt;/SA1108BlockStatementsMustNotContainEmbeddedComments&gt;&lt;SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;True&lt;/SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;&lt;SA1120CommentsMustContainText&gt;False&lt;/SA1120CommentsMustContainText&gt;&lt;SA1121UseBuiltInTypeAlias&gt;False&lt;/SA1121UseBuiltInTypeAlias&gt;&lt;SA1122UseStringEmptyForEmptyStrings&gt;False&lt;/SA1122UseStringEmptyForEmptyStrings&gt;&lt;SA1123DoNotPlaceRegionsWithinElements&gt;False&lt;/SA1123DoNotPlaceRegionsWithinElements&gt;&lt;SA1124CodeMustNotContainEmptyRegions&gt;True&lt;/SA1124CodeMustNotContainEmptyRegions&gt;&lt;/StyleCop.Readability&gt;&lt;StyleCop.Spacing&gt;&lt;SA1001CommasMustBeSpacedCorrectly&gt;False&lt;/SA1001CommasMustBeSpacedCorrectly&gt;&lt;SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;False&lt;/SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;&lt;SA1006PreprocessorKeywordsMustNotBePrecededBySpaLine truncated <s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Cleanup/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Cleanup"&gt;&lt;CSArrangeThisQualifier&gt;True&lt;/CSArrangeThisQualifier&gt;&lt;CSRemoveCodeRedundancies&gt;True&lt;/CSRemoveCodeRedundancies&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSUseVar&gt;&lt;BehavourStyle&gt;CAN_CHANGE_TO_EXPLICIT&lt;/BehavourStyle&gt;&lt;LocalVariableStyle&gt;ALWAYS_EXPLICIT&lt;/LocalVariableStyle&gt;&lt;ForeachVariableStyle&gt;ALWAYS_EXPLICIT&lt;/ForeachVariableStyle&gt;&lt;/CSUseVar&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;False&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;CSharpFormatDocComments&gt;True&lt;/CSharpFormatDocComments&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;False&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;False&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;False&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;False&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;False&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;False&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;StyleCop.Layout&gt;&lt;SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;False&lt;/SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;&lt;SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;True&lt;/SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;&lt;SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;True&lt;/SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;&lt;SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;True&lt;/SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;&lt;SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;True&lt;/SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;&lt;SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;False&lt;/SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;&lt;SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;False&lt;/SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;&lt;SA1515SingleLineCommentMustBeProceededByBlankLine&gt;False&lt;/SA1515SingleLineCommentMustBeProceededByBlankLine&gt;&lt;/StyleCop.Layout&gt;&lt;StyleCop.Readability&gt;&lt;SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;True&lt;/SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;&lt;SA1106CodeMustNotContainEmptyStatements&gt;True&lt;/SA1106CodeMustNotContainEmptyStatements&gt;&lt;SA1108BlockStatementsMustNotContainEmbeddedComments&gt;True&lt;/SA1108BlockStatementsMustNotContainEmbeddedComments&gt;&lt;SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;True&lt;/SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;&lt;SA1120CommentsMustContainText&gt;False&lt;/SA1120CommentsMustContainText&gt;&lt;SA1121UseBuiltInTypeAlias&gt;False&lt;/SA1121UseBuiltInTypeAlias&gt;&lt;SA1122UseStringEmptyForEmptyStrings&gt;False&lt;/SA1122UseStringEmptyForEmptyStrings&gt;&lt;SA1123DoNotPlaceRegionsWithinElements&gt;False&lt;/SA1123DoNotPlaceRegionsWithinElements&gt;&lt;SA1124CodeMustNotContainEmptyRegions&gt;True&lt;/SA1124CodeMustNotContainEmptyRegions&gt;&lt;/StyleCop.Readability&gt;&lt;StyleCop.Spacing&gt;&lt;SA1001CommasMustBeSpacedCorrectly&gt;False&lt;/SA1001CommasMustBeSpacedCorrectly&gt;&lt;SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;False&lt;/SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;&lt;SA1006PreprocessorKeywordsMustNotBePrecededBySpaLine truncated
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Simple_0020Reformat/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Simple Reformat"&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;False&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;False&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;False&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;False&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;False&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;False&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;False&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;StyleCop.Spacing&gt;&lt;SA1001CommasMustBeSpacedCorrectly&gt;False&lt;/SA1001CommasMustBeSpacedCorrectly&gt;&lt;SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;False&lt;/SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;&lt;SA1006PreprocessorKeywordsMustNotBePrecededBySpace&gt;True&lt;/SA1006PreprocessorKeywordsMustNotBePrecededBySpace&gt;&lt;SA1021NegativeSignsMustBeSpacedCorrectly&gt;True&lt;/SA1021NegativeSignsMustBeSpacedCorrectly&gt;&lt;SA1022PositiveSignsMustBeSpacedCorrectly&gt;True&lt;/SA1022PositiveSignsMustBeSpacedCorrectly&gt;&lt;SA1025CodeMustNotContainMultipleWhitespaceInARow&gt;True&lt;/SA1025CodeMustNotContainMultipleWhitespaceInARow&gt;&lt;/StyleCop.Spacing&gt;&lt;StyleCop.Readability&gt;&lt;SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;True&lt;/SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;&lt;SA1106CodeMustNotContainEmptyStatements&gt;True&lt;/SA1106CodeMustNotContainEmptyStatements&gt;&lt;SA1108BlockStatementsMustNotContainEmbeddedComments&gt;True&lt;/SA1108BlockStatementsMustNotContainEmbeddedComments&gt;&lt;SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;True&lt;/SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;&lt;SA1120CommentsMustContainText&gt;False&lt;/SA1120CommentsMustContainText&gt;&lt;SA1121UseBuiltInTypeAlias&gt;False&lt;/SA1121UseBuiltInTypeAlias&gt;&lt;SA1122UseStringEmptyForEmptyStrings&gt;False&lt;/SA1122UseStringEmptyForEmptyStrings&gt;&lt;SA1123DoNotPlaceRegionsWithinElements&gt;False&lt;/SA1123DoNotPlaceRegionsWithinElements&gt;&lt;SA1124CodeMustNotContainEmptyRegions&gt;True&lt;/SA1124CodeMustNotContainEmptyRegions&gt;&lt;/StyleCop.Readability&gt;&lt;StyleCop.Layout&gt;&lt;SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;False&lt;/SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;&lt;SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;True&lt;/SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;&lt;SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;True&lt;/SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;&lt;SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;True&lt;/SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;&lt;SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;True&lt;/SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;&lt;SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;False&lt;/SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;&lt;SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;False&lt;/SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;&lt;SA1515SingleLineCommentMustBeProceededByBlankLine&gt;False&lt;/SA1515SingleLineCommentMustBeProceededByBlankLine&gt;&lt;/StyleCop.Layout&gt;&lt;StyleCop.Ordering&gt;&lt;AlphabeticalUsingDirectives&gt;Ignore&lt;/AlphabeticalUsingDirectives&gt;&lt;ExpandUsingDirectiLine truncated <s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Simple_0020Reformat/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Simple Reformat"&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;False&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;False&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;False&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;False&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;False&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;False&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;False&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;StyleCop.Spacing&gt;&lt;SA1001CommasMustBeSpacedCorrectly&gt;False&lt;/SA1001CommasMustBeSpacedCorrectly&gt;&lt;SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;False&lt;/SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;&lt;SA1006PreprocessorKeywordsMustNotBePrecededBySpace&gt;True&lt;/SA1006PreprocessorKeywordsMustNotBePrecededBySpace&gt;&lt;SA1021NegativeSignsMustBeSpacedCorrectly&gt;True&lt;/SA1021NegativeSignsMustBeSpacedCorrectly&gt;&lt;SA1022PositiveSignsMustBeSpacedCorrectly&gt;True&lt;/SA1022PositiveSignsMustBeSpacedCorrectly&gt;&lt;SA1025CodeMustNotContainMultipleWhitespaceInARow&gt;True&lt;/SA1025CodeMustNotContainMultipleWhitespaceInARow&gt;&lt;/StyleCop.Spacing&gt;&lt;StyleCop.Readability&gt;&lt;SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;True&lt;/SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;&lt;SA1106CodeMustNotContainEmptyStatements&gt;True&lt;/SA1106CodeMustNotContainEmptyStatements&gt;&lt;SA1108BlockStatementsMustNotContainEmbeddedComments&gt;True&lt;/SA1108BlockStatementsMustNotContainEmbeddedComments&gt;&lt;SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;True&lt;/SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;&lt;SA1120CommentsMustContainText&gt;False&lt;/SA1120CommentsMustContainText&gt;&lt;SA1121UseBuiltInTypeAlias&gt;False&lt;/SA1121UseBuiltInTypeAlias&gt;&lt;SA1122UseStringEmptyForEmptyStrings&gt;False&lt;/SA1122UseStringEmptyForEmptyStrings&gt;&lt;SA1123DoNotPlaceRegionsWithinElements&gt;False&lt;/SA1123DoNotPlaceRegionsWithinElements&gt;&lt;SA1124CodeMustNotContainEmptyRegions&gt;True&lt;/SA1124CodeMustNotContainEmptyRegions&gt;&lt;/StyleCop.Readability&gt;&lt;StyleCop.Layout&gt;&lt;SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;False&lt;/SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;&lt;SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;True&lt;/SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;&lt;SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;True&lt;/SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;&lt;SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;True&lt;/SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;&lt;SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;True&lt;/SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;&lt;SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;False&lt;/SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;&lt;SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;False&lt;/SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;&lt;SA1515SingleLineCommentMustBeProceededByBlankLine&gt;False&lt;/SA1515SingleLineCommentMustBeProceededByBlankLine&gt;&lt;/StyleCop.Layout&gt;&lt;StyleCop.Ordering&gt;&lt;AlphabeticalUsingDirectives&gt;Ignore&lt;/AlphabeticalUsingDirectives&gt;&lt;ExpandUsingDirectiLine truncated
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Cleanup</s:String> <s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Cleanup</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Simple Reformat</s:String> <s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Simple Reformat</s:String>
@@ -25,6 +25,7 @@
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_USING_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_USING_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_WHILE_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_WHILE_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64> <s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_USER_LINEBREAKS/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_COMPLEX_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">True</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_COMPLEX_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
@@ -36,7 +37,9 @@
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">180</s:Int64> <s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">180</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_MULTIPLE_DECLARATION_STYLE/@EntryValue">WRAP_IF_LONG</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_MULTIPLE_DECLARATION_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_TERNARY_EXPR_STYLE/@EntryValue">WRAP_IF_LONG</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_TERNARY_EXPR_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AllowAlias/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AllowAlias/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderRegionName/@EntryValue">license</s:String> <s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderRegionName/@EntryValue">license</s:String>
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">/*&#xD; <s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">/*&#xD;
This file is part of $SOLUTION$.&#xD; This file is part of $SOLUTION$.&#xD;
-5
View File
@@ -52,7 +52,6 @@ namespace Vocaluxe.Base
public static int ScreenH = 576; public static int ScreenH = 576;
public static EAntiAliasingModes AAMode = EAntiAliasingModes.X0; public static EAntiAliasingModes AAMode = EAntiAliasingModes.X0;
public static EColorDepth ColorDepth = EColorDepth.Bit32;
public static EOffOn VSync = EOffOn.TR_CONFIG_ON; public static EOffOn VSync = EOffOn.TR_CONFIG_ON;
public static EOffOn FullScreen = EOffOn.TR_CONFIG_ON; public static EOffOn FullScreen = EOffOn.TR_CONFIG_ON;
@@ -166,7 +165,6 @@ namespace Vocaluxe.Base
xmlReader.TryGetIntValue("//root/Graphics/ScreenW", ref ScreenW); xmlReader.TryGetIntValue("//root/Graphics/ScreenW", ref ScreenW);
xmlReader.TryGetIntValue("//root/Graphics/ScreenH", ref ScreenH); xmlReader.TryGetIntValue("//root/Graphics/ScreenH", ref ScreenH);
xmlReader.TryGetEnumValue("//root/Graphics/AAMode", ref AAMode); xmlReader.TryGetEnumValue("//root/Graphics/AAMode", ref AAMode);
xmlReader.TryGetEnumValue("//root/Graphics/Colors", ref ColorDepth);
xmlReader.TryGetFloatValue("//root/Graphics/MaxFPS", ref MaxFPS); xmlReader.TryGetFloatValue("//root/Graphics/MaxFPS", ref MaxFPS);
xmlReader.TryGetEnumValue("//root/Graphics/VSync", ref VSync); xmlReader.TryGetEnumValue("//root/Graphics/VSync", ref VSync);
xmlReader.TryGetEnumValue("//root/Graphics/FullScreen", ref FullScreen); xmlReader.TryGetEnumValue("//root/Graphics/FullScreen", ref FullScreen);
@@ -330,9 +328,6 @@ namespace Vocaluxe.Base
writer.WriteComment("AAMode: " + CHelper.ListStrings(Enum.GetNames(typeof(EAntiAliasingModes)))); writer.WriteComment("AAMode: " + CHelper.ListStrings(Enum.GetNames(typeof(EAntiAliasingModes))));
writer.WriteElementString("AAMode", Enum.GetName(typeof(EAntiAliasingModes), AAMode)); writer.WriteElementString("AAMode", Enum.GetName(typeof(EAntiAliasingModes), AAMode));
writer.WriteComment("Colors: " + CHelper.ListStrings(Enum.GetNames(typeof(EColorDepth))));
writer.WriteElementString("Colors", Enum.GetName(typeof(EColorDepth), ColorDepth));
writer.WriteComment("MaxFPS should be between 1..200"); writer.WriteComment("MaxFPS should be between 1..200");
writer.WriteElementString("MaxFPS", MaxFPS.ToString("#")); writer.WriteElementString("MaxFPS", MaxFPS.ToString("#"));
+5
View File
@@ -584,6 +584,11 @@ namespace Vocaluxe.Base
return CSongs.NumSongsInCategory(categoryIndex); return CSongs.NumSongsInCategory(categoryIndex);
} }
public bool IsInCategory()
{
return CSongs.IsInCategory;
}
public int GetCurrentCategoryIndex() public int GetCurrentCategoryIndex()
{ {
return CSongs.Category; return CSongs.Category;
+2 -1
View File
@@ -19,6 +19,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Vocaluxe.Lib.Playlist; using Vocaluxe.Lib.Playlist;
@@ -223,7 +224,7 @@ namespace Vocaluxe.Base
private static CPlaylistFile _ConvertUSDXPlaylist(string file) private static CPlaylistFile _ConvertUSDXPlaylist(string file)
{ {
CPlaylistFile pl = new CPlaylistFile(); CPlaylistFile pl = new CPlaylistFile();
var allSongs = CSongs.AllSongs; ReadOnlyCollection<CSong> allSongs = CSongs.AllSongs;
if (!File.Exists(file)) if (!File.Exists(file))
return null; return null;
+2
View File
@@ -52,6 +52,8 @@ namespace Vocaluxe.Base
if (value == _Tabs) if (value == _Tabs)
return; return;
_Tabs = value; _Tabs = value;
if (_Tabs == EOffOn.TR_CONFIG_ON)
CSongs.Category = -1;
_SetChanged(); _SetChanged();
} }
} }
+14 -10
View File
@@ -76,20 +76,25 @@ namespace Vocaluxe.Base
public static int Category public static int Category
{ {
get { return _CatIndex; } get
{
if (_CatIndex >= Categories.Count)
_CatIndex = -1;
return _CatIndex;
}
set set
{ {
if (value == -1 || IsCatIndexValid(value)) if (value == -1 || _IsCatIndexValid(value))
_CatIndex = value; _CatIndex = value;
} }
} }
public static bool IsInCategory public static bool IsInCategory
{ {
get { return _CatIndex >= 0; } get { return _IsCatIndexValid(_CatIndex); }
} }
private static bool IsCatIndexValid(int catIndex) private static bool _IsCatIndexValid(int catIndex)
{ {
return catIndex >= 0 && catIndex < Categories.Count; return catIndex >= 0 && catIndex < Categories.Count;
} }
@@ -101,7 +106,7 @@ namespace Vocaluxe.Base
/// <returns></returns> /// <returns></returns>
public static int NumSongsInCategory(int catIndex) public static int NumSongsInCategory(int catIndex)
{ {
return IsCatIndexValid(catIndex) ? Categories[catIndex].Songs.Count(sp => !sp.IsSung) : 0; return _IsCatIndexValid(catIndex) ? Categories[catIndex].Songs.Count(sp => !sp.IsSung) : 0;
} }
public static void NextCategory() public static void NextCategory()
@@ -139,7 +144,7 @@ namespace Vocaluxe.Base
public static string GetCurrentCategoryName() public static string GetCurrentCategoryName()
{ {
return IsCatIndexValid(_CatIndex) ? Categories[_CatIndex].Name : ""; return _IsCatIndexValid(_CatIndex) ? Categories[_CatIndex].Name : "";
} }
public static CSong GetSong(int songID) public static CSong GetSong(int songID)
@@ -170,7 +175,7 @@ namespace Vocaluxe.Base
public static void ResetPartySongSung(int catIndex) public static void ResetPartySongSung(int catIndex)
{ {
if (IsCatIndexValid(catIndex)) if (_IsCatIndexValid(catIndex))
{ {
foreach (CSongPointer song in Categories[catIndex].Songs) foreach (CSongPointer song in Categories[catIndex].Songs)
song.IsSung = false; song.IsSung = false;
@@ -247,7 +252,7 @@ namespace Vocaluxe.Base
get get
{ {
List<CSong> songs = new List<CSong>(); List<CSong> songs = new List<CSong>();
if (IsCatIndexValid(_CatIndex)) if (_IsCatIndexValid(_CatIndex))
{ {
foreach (CSongPointer sp in Categories[_CatIndex].Songs) foreach (CSongPointer sp in Categories[_CatIndex].Songs)
{ {
@@ -268,14 +273,13 @@ namespace Vocaluxe.Base
{ {
if (index < 0) if (index < 0)
return null; return null;
var visSongs = VisibleSongs; ReadOnlyCollection<CSong> visSongs = VisibleSongs;
return (index < visSongs.Count) ? visSongs[index] : null; return (index < visSongs.Count) ? visSongs[index] : null;
} }
private static void _HandleCategoriesChanged(object sender, EventArgs args) private static void _HandleCategoriesChanged(object sender, EventArgs args)
{ {
_CategoriesForRandom.Clear(); _CategoriesForRandom.Clear();
Category = _CatIndex;
} }
public static void Sort(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions) public static void Sort(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions)
+19
View File
@@ -1,3 +1,22 @@
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
+19
View File
@@ -1,3 +1,22 @@
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System; using System;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
+19
View File
@@ -1,3 +1,22 @@
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using Vocaluxe.Base; using Vocaluxe.Base;
using VocaluxeLib.Menu.SongMenu; using VocaluxeLib.Menu.SongMenu;
+20 -1
View File
@@ -1,4 +1,23 @@
using System; #region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
+20 -1
View File
@@ -1,4 +1,23 @@
using VocaluxeLib.Menu.SongMenu; #region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using VocaluxeLib.Menu.SongMenu;
namespace Vocaluxe.GameModes namespace Vocaluxe.GameModes
{ {
+235 -257
View File
@@ -18,6 +18,7 @@
#endregion #endregion
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Threading; using System.Threading;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@@ -25,13 +26,33 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
using Vocaluxe.Base; using Vocaluxe.Base;
using Vocaluxe.Base.Font; using Vocaluxe.Base.Font;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
using BeginMode = OpenTK.Graphics.OpenGL.BeginMode;
using BlendingFactorDest = OpenTK.Graphics.OpenGL.BlendingFactorDest;
using BlendingFactorSrc = OpenTK.Graphics.OpenGL.BlendingFactorSrc;
using BufferAccess = OpenTK.Graphics.OpenGL.BufferAccess;
using BufferTarget = OpenTK.Graphics.OpenGL.BufferTarget;
using BufferUsageHint = OpenTK.Graphics.OpenGL.BufferUsageHint;
using ClearBufferMask = OpenTK.Graphics.OpenGL.ClearBufferMask;
using DepthFunction = OpenTK.Graphics.OpenGL.DepthFunction;
using EnableCap = OpenTK.Graphics.OpenGL.EnableCap;
using GL = OpenTK.Graphics.OpenGL.GL;
using GenerateMipmapTarget = OpenTK.Graphics.OpenGL.GenerateMipmapTarget;
using KeyPressEventArgs = System.Windows.Forms.KeyPressEventArgs;
using MatrixMode = OpenTK.Graphics.OpenGL.MatrixMode;
using PixelFormat = OpenTK.Graphics.OpenGL.PixelFormat;
using PixelInternalFormat = OpenTK.Graphics.OpenGL.PixelInternalFormat;
using PixelStoreParameter = OpenTK.Graphics.OpenGL.PixelStoreParameter;
using PixelType = OpenTK.Graphics.OpenGL.PixelType;
using TextureMagFilter = OpenTK.Graphics.OpenGL.TextureMagFilter;
using TextureMinFilter = OpenTK.Graphics.OpenGL.TextureMinFilter;
using TextureParameterName = OpenTK.Graphics.OpenGL.TextureParameterName;
using TextureTarget = OpenTK.Graphics.OpenGL.TextureTarget;
namespace Vocaluxe.Lib.Draw namespace Vocaluxe.Lib.Draw
{ {
@@ -89,12 +110,11 @@ namespace Vocaluxe.Lib.Draw
//Check AA Mode //Check AA Mode
CConfig.AAMode = (EAntiAliasingModes)_CheckAntiAliasingMode((int)CConfig.AAMode); CConfig.AAMode = (EAntiAliasingModes)_CheckAntiAliasingMode((int)CConfig.AAMode);
CConfig.ColorDepth = (EColorDepth)_CheckColorDepth((int)CConfig.ColorDepth);
bool ok = false; bool ok = false;
try try
{ {
GraphicsMode gm = new GraphicsMode((int)CConfig.ColorDepth, 24, 0, (int)CConfig.AAMode); GraphicsMode gm = new GraphicsMode(32, 24, 0, (int)CConfig.AAMode);
_Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default); _Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default);
if (_Control.GraphicsMode != null) if (_Control.GraphicsMode != null)
ok = true; ok = true;
@@ -221,8 +241,7 @@ namespace Vocaluxe.Lib.Draw
screenNr = i; screenNr = i;
} }
DesktopBounds = new Rectangle(Screen.AllScreens[screenNr].Bounds.Location, DesktopBounds = new Rectangle(Screen.AllScreens[screenNr].Bounds.Location, new Size(Screen.AllScreens[screenNr].Bounds.Width, Screen.AllScreens[screenNr].Bounds.Height));
new Size(Screen.AllScreens[screenNr].Bounds.Width, Screen.AllScreens[screenNr].Bounds.Height));
if (WindowState == FormWindowState.Maximized) if (WindowState == FormWindowState.Maximized)
{ {
@@ -260,7 +279,7 @@ namespace Vocaluxe.Lib.Draw
protected override void OnLoad(EventArgs e) protected override void OnLoad(EventArgs e)
{ {
OpenTK.Graphics.OpenGL.GL.ClearColor(Color.Black); GL.ClearColor(Color.Black);
} }
protected override void OnResize(EventArgs e) protected override void OnResize(EventArgs e)
@@ -338,7 +357,7 @@ namespace Vocaluxe.Lib.Draw
_Keys.KeyDown(e); _Keys.KeyDown(e);
} }
private void _OnKeyPressEvent(object sender, System.Windows.Forms.KeyPressEventArgs e) private void _OnKeyPressEvent(object sender, KeyPressEventArgs e)
{ {
_Keys.KeyPress(e); _Keys.KeyPress(e);
} }
@@ -368,10 +387,10 @@ namespace Vocaluxe.Lib.Draw
_Y = (_Control.Height - _H) / 2; _Y = (_Control.Height - _H) / 2;
} }
OpenTK.Graphics.OpenGL.GL.MatrixMode(OpenTK.Graphics.OpenGL.MatrixMode.Projection); GL.MatrixMode(MatrixMode.Projection);
OpenTK.Graphics.OpenGL.GL.LoadIdentity(); GL.LoadIdentity();
OpenTK.Graphics.OpenGL.GL.Ortho(0, CSettings.RenderW, CSettings.RenderH, 0, CSettings.ZNear, CSettings.ZFar); GL.Ortho(0, CSettings.RenderW, CSettings.RenderH, 0, CSettings.ZNear, CSettings.ZFar);
OpenTK.Graphics.OpenGL.GL.Viewport(_X, _Y, _W, _H); GL.Viewport(_X, _Y, _W, _H);
} }
#region implementation #region implementation
@@ -382,14 +401,14 @@ namespace Vocaluxe.Lib.Draw
Text = CSettings.GetFullVersionText(); Text = CSettings.GetFullVersionText();
// Init Texturing // Init Texturing
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Texture2D); GL.Enable(EnableCap.Texture2D);
OpenTK.Graphics.OpenGL.GL.BlendFunc(OpenTK.Graphics.OpenGL.BlendingFactorSrc.SrcAlpha, OpenTK.Graphics.OpenGL.BlendingFactorDest.OneMinusSrcAlpha); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
OpenTK.Graphics.OpenGL.GL.PixelStore(OpenTK.Graphics.OpenGL.PixelStoreParameter.UnpackAlignment, 1); GL.PixelStore(PixelStoreParameter.UnpackAlignment, 1);
OpenTK.Graphics.OpenGL.GL.DepthRange(CSettings.ZFar, CSettings.ZNear); GL.DepthRange(CSettings.ZFar, CSettings.ZNear);
OpenTK.Graphics.OpenGL.GL.DepthFunc(OpenTK.Graphics.OpenGL.DepthFunction.Lequal); GL.DepthFunc(DepthFunction.Lequal);
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.DepthTest); GL.Enable(EnableCap.DepthTest);
return true; return true;
} }
@@ -480,15 +499,15 @@ namespace Vocaluxe.Lib.Draw
#region Basic Draw Methods #region Basic Draw Methods
public void ClearScreen() public void ClearScreen()
{ {
OpenTK.Graphics.OpenGL.GL.Clear(OpenTK.Graphics.OpenGL.ClearBufferMask.ColorBufferBit | OpenTK.Graphics.OpenGL.ClearBufferMask.DepthBufferBit); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
} }
public STexture CopyScreen() public STexture CopyScreen()
{ {
STexture texture = new STexture(-1); STexture texture = new STexture(-1);
int id = OpenTK.Graphics.OpenGL.GL.GenTexture(); int id = GL.GenTexture();
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, id); GL.BindTexture(TextureTarget.Texture2D, id);
texture.ID = id; texture.ID = id;
texture.Width = _W; texture.Width = _W;
@@ -499,19 +518,14 @@ namespace Vocaluxe.Lib.Draw
texture.WidthRatio = texture.Width / texture.W2; texture.WidthRatio = texture.Width / texture.W2;
texture.HeightRatio = texture.Height / texture.H2; texture.HeightRatio = texture.Height / texture.H2;
OpenTK.Graphics.OpenGL.GL.TexImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, OpenTK.Graphics.OpenGL.PixelInternalFormat.Rgba, (int)texture.W2, GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, (int)texture.W2, (int)texture.H2, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
(int)texture.H2, 0,
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.CopyTexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, _X, _Y, GL.CopyTexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, _X, _Y, (int)texture.Width, (int)texture.Height);
(int)texture.Width, (int)texture.Height);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMagFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMagFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
// Add to Texture List // Add to Texture List
texture.Color = new SColorF(1f, 1f, 1f, 1f); texture.Color = new SColorF(1f, 1f, 1f, 1f);
@@ -535,12 +549,11 @@ namespace Vocaluxe.Lib.Draw
} }
else else
{ {
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
OpenTK.Graphics.OpenGL.GL.CopyTexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, 0, 0, GL.CopyTexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, 0, 0, (int)texture.Width, (int)texture.Height);
(int)texture.Width, (int)texture.Height);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
} }
@@ -560,7 +573,7 @@ namespace Vocaluxe.Lib.Draw
{ {
BitmapData bmpData = screen.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); BitmapData bmpData = screen.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
OpenTK.Graphics.OpenGL.GL.ReadPixels(0, 0, width, height, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, bmpData.Scan0); GL.ReadPixels(0, 0, width, height, PixelFormat.Bgra, PixelType.UnsignedByte, bmpData.Scan0);
screen.UnlockBits(bmpData); screen.UnlockBits(bmpData);
screen.RotateFlip(RotateFlipType.RotateNoneFlipY); screen.RotateFlip(RotateFlipType.RotateNoneFlipY);
@@ -578,17 +591,17 @@ namespace Vocaluxe.Lib.Draw
public void DrawColor(SColorF color, SRectF rect) public void DrawColor(SColorF color, SRectF rect)
{ {
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Enable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.Begin(OpenTK.Graphics.OpenGL.BeginMode.Quads); GL.Begin(BeginMode.Quads);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X, rect.Y, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X, rect.Y, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X, rect.Y + rect.H, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X, rect.Y + rect.H, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X + rect.W, rect.Y + rect.H, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X + rect.W, rect.Y + rect.H, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X + rect.W, rect.Y, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X + rect.W, rect.Y, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.End(); GL.End();
OpenTK.Graphics.OpenGL.GL.Disable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Disable(EnableCap.Blend);
} }
public void DrawColorReflection(SColorF color, SRectF rect, float space, float height) public void DrawColorReflection(SColorF color, SRectF rect, float space, float height)
@@ -614,32 +627,32 @@ namespace Vocaluxe.Lib.Draw
ry2 = rect.Y + rect.H + space + height; ry2 = rect.Y + rect.H + space + height;
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Enable(EnableCap.Blend);
if (Math.Abs(rect.Rotation) > 0.001) if (Math.Abs(rect.Rotation) > 0.001)
{ {
OpenTK.Graphics.OpenGL.GL.Translate(0.5f, 0.5f, 0); GL.Translate(0.5f, 0.5f, 0);
OpenTK.Graphics.OpenGL.GL.Rotate(-rect.Rotation, 0f, 0f, 1f); GL.Rotate(-rect.Rotation, 0f, 0f, 1f);
OpenTK.Graphics.OpenGL.GL.Translate(-0.5f, -0.5f, 0); GL.Translate(-0.5f, -0.5f, 0);
} }
OpenTK.Graphics.OpenGL.GL.Begin(OpenTK.Graphics.OpenGL.BeginMode.Quads); GL.Begin(BeginMode.Quads);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, 0f); GL.Color4(color.R, color.G, color.B, 0f);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, 0f); GL.Color4(color.R, color.G, color.B, 0f);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.End(); GL.End();
OpenTK.Graphics.OpenGL.GL.Disable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Disable(EnableCap.Blend);
} }
#endregion Basic Draw Methods #endregion Basic Draw Methods
@@ -718,8 +731,8 @@ namespace Vocaluxe.Lib.Draw
h = maxSize; h = maxSize;
} }
int id = OpenTK.Graphics.OpenGL.GL.GenTexture(); int id = GL.GenTexture();
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, id); GL.BindTexture(TextureTarget.Texture2D, id);
texture.ID = id; texture.ID = id;
texture.Width = w; texture.Width = w;
@@ -727,45 +740,41 @@ namespace Vocaluxe.Lib.Draw
texture.W2 = MathHelper.NextPowerOfTwo(w); texture.W2 = MathHelper.NextPowerOfTwo(w);
texture.H2 = MathHelper.NextPowerOfTwo(h); texture.H2 = MathHelper.NextPowerOfTwo(h);
try
using (Bitmap bmp2 = new Bitmap((int)texture.W2, (int)texture.H2))
{ {
Graphics g = Graphics.FromImage(bmp2); using (Bitmap bmp2 = new Bitmap((int)texture.W2, (int)texture.H2))
g.InterpolationMode = InterpolationMode.HighQualityBicubic; {
g.SmoothingMode = SmoothingMode.HighQuality; Graphics g = Graphics.FromImage(bmp2);
g.DrawImage(bmp, new Rectangle(0, 0, bmp2.Width, bmp2.Height)); g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.Dispose(); g.SmoothingMode = SmoothingMode.HighQuality;
g.DrawImage(bmp, new Rectangle(0, 0, bmp2.Width, bmp2.Height));
g.Dispose();
texture.WidthRatio = 1f; texture.WidthRatio = 1f;
texture.HeightRatio = 1f; texture.HeightRatio = 1f;
BitmapData bmpData = bmp2.LockBits(new Rectangle(0, 0, bmp2.Width, bmp2.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); BitmapData bmpData = bmp2.LockBits(new Rectangle(0, 0, bmp2.Width, bmp2.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, (int)texture.W2, (int)texture.H2, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.TexImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, OpenTK.Graphics.OpenGL.PixelInternalFormat.Rgba, (int)texture.W2, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, bmpData.Width, bmpData.Height, PixelFormat.Bgra, PixelType.UnsignedByte, bmpData.Scan0);
(int)texture.H2, 0,
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, bmpData.Width, bmpData.Height, bmp2.UnlockBits(bmpData);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, bmpData.Scan0); }
}
bmp2.UnlockBits(bmpData); catch
{
CLog.LogError(w + " " + h + " " + (int)texture.W2 + " " + (int)texture.H2);
throw;
} }
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureWrapS, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge);
(int)OpenTK.Graphics.OpenGL.TextureParameterName.ClampToEdge); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureWrapT,
(int)OpenTK.Graphics.OpenGL.TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMagFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMagFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.LinearMipmapLinear);
//GL.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.Ext.GenerateMipmap(OpenTK.Graphics.OpenGL.GenerateMipmapTarget.Texture2D); GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
// Add to Texture List // Add to Texture List
@@ -790,11 +799,10 @@ namespace Vocaluxe.Lib.Draw
{ {
try try
{ {
OpenTK.Graphics.OpenGL.GL.GenBuffers(1, out texture.PBO); GL.GenBuffers(1, out texture.PBO);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, texture.PBO); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, texture.PBO);
OpenTK.Graphics.OpenGL.GL.BufferData(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, (IntPtr)(w * h * 4), IntPtr.Zero, GL.BufferData(BufferTarget.PixelUnpackBuffer, (IntPtr)(w * h * 4), IntPtr.Zero, BufferUsageHint.StreamDraw);
OpenTK.Graphics.OpenGL.BufferUsageHint.StreamDraw); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, 0);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, 0);
} }
catch (Exception) catch (Exception)
{ {
@@ -802,8 +810,8 @@ namespace Vocaluxe.Lib.Draw
} }
} }
int id = OpenTK.Graphics.OpenGL.GL.GenTexture(); int id = GL.GenTexture();
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, id); GL.BindTexture(TextureTarget.Texture2D, id);
texture.ID = id; texture.ID = id;
texture.Width = w; texture.Width = w;
@@ -814,25 +822,20 @@ namespace Vocaluxe.Lib.Draw
texture.WidthRatio = texture.Width / texture.W2; texture.WidthRatio = texture.Width / texture.W2;
texture.HeightRatio = texture.Height / texture.H2; texture.HeightRatio = texture.Height / texture.H2;
OpenTK.Graphics.OpenGL.GL.TexImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, OpenTK.Graphics.OpenGL.PixelInternalFormat.Rgba, (int)texture.W2, GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, (int)texture.W2, (int)texture.H2, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
(int)texture.H2, 0,
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, w, h, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, w, h, PixelFormat.Bgra, PixelType.UnsignedByte, data);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, data);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMagFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMagFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
//GL.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
//GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
// Add to Texture List // Add to Texture List
texture.Color = new SColorF(1f, 1f, 1f, 1f); texture.Color = new SColorF(1f, 1f, 1f, 1f);
@@ -856,11 +859,10 @@ namespace Vocaluxe.Lib.Draw
{ {
try try
{ {
OpenTK.Graphics.OpenGL.GL.GenBuffers(1, out texture.PBO); GL.GenBuffers(1, out texture.PBO);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, texture.PBO); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, texture.PBO);
OpenTK.Graphics.OpenGL.GL.BufferData(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, (IntPtr)data.Length, IntPtr.Zero, GL.BufferData(BufferTarget.PixelUnpackBuffer, (IntPtr)data.Length, IntPtr.Zero, BufferUsageHint.StreamDraw);
OpenTK.Graphics.OpenGL.BufferUsageHint.StreamDraw); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, 0);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, 0);
} }
catch (Exception) catch (Exception)
{ {
@@ -869,8 +871,8 @@ namespace Vocaluxe.Lib.Draw
} }
} }
int id = OpenTK.Graphics.OpenGL.GL.GenTexture(); int id = GL.GenTexture();
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, id); GL.BindTexture(TextureTarget.Texture2D, id);
texture.ID = id; texture.ID = id;
texture.Width = w; texture.Width = w;
@@ -881,25 +883,20 @@ namespace Vocaluxe.Lib.Draw
texture.WidthRatio = texture.Width / texture.W2; texture.WidthRatio = texture.Width / texture.W2;
texture.HeightRatio = texture.Height / texture.H2; texture.HeightRatio = texture.Height / texture.H2;
OpenTK.Graphics.OpenGL.GL.TexImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, OpenTK.Graphics.OpenGL.PixelInternalFormat.Rgba, (int)texture.W2, GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, (int)texture.W2, (int)texture.H2, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
(int)texture.H2, 0,
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, w, h, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, w, h, PixelFormat.Bgra, PixelType.UnsignedByte, data);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, data);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMagFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMagFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
//GL.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
//GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
// Add to Texture List // Add to Texture List
texture.Color = new SColorF(1f, 1f, 1f, 1f); texture.Color = new SColorF(1f, 1f, 1f, 1f);
@@ -944,22 +941,21 @@ namespace Vocaluxe.Lib.Draw
{ {
try try
{ {
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, texture.PBO); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, texture.PBO);
IntPtr buffer = OpenTK.Graphics.OpenGL.GL.MapBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, OpenTK.Graphics.OpenGL.BufferAccess.WriteOnly); IntPtr buffer = GL.MapBuffer(BufferTarget.PixelUnpackBuffer, BufferAccess.WriteOnly);
byte[] d = new byte[(int)texture.Height * (int)texture.Width * 4]; byte[] d = new byte[(int)texture.Height * (int)texture.Width * 4];
Marshal.Copy(data, d, 0, (int)texture.Height * (int)texture.Width * 4); Marshal.Copy(data, d, 0, (int)texture.Height * (int)texture.Width * 4);
Marshal.Copy(d, 0, buffer, (int)texture.Height * (int)texture.Width * 4); Marshal.Copy(d, 0, buffer, (int)texture.Height * (int)texture.Width * 4);
OpenTK.Graphics.OpenGL.GL.UnmapBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer); GL.UnmapBuffer(BufferTarget.PixelUnpackBuffer);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, 0); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, 0);
return true; return true;
} }
@@ -969,26 +965,21 @@ namespace Vocaluxe.Lib.Draw
} }
} }
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, PixelFormat.Bgra, PixelType.UnsignedByte, data);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, data);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureWrapS, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge);
(int)OpenTK.Graphics.OpenGL.TextureParameterName.ClampToEdge); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureWrapT,
(int)OpenTK.Graphics.OpenGL.TextureParameterName.ClampToEdge);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.LinearMipmapLinear);
//GL.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.Ext.GenerateMipmap(OpenTK.Graphics.OpenGL.GenerateMipmapTarget.Texture2D); GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
return true; return true;
} }
@@ -1001,39 +992,35 @@ namespace Vocaluxe.Lib.Draw
{ {
if (_UsePBO) if (_UsePBO)
{ {
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, texture.PBO); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, texture.PBO);
IntPtr buffer = OpenTK.Graphics.OpenGL.GL.MapBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, OpenTK.Graphics.OpenGL.BufferAccess.WriteOnly); IntPtr buffer = GL.MapBuffer(BufferTarget.PixelUnpackBuffer, BufferAccess.WriteOnly);
Marshal.Copy(data, 0, buffer, data.Length); Marshal.Copy(data, 0, buffer, data.Length);
OpenTK.Graphics.OpenGL.GL.UnmapBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer); GL.UnmapBuffer(BufferTarget.PixelUnpackBuffer);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, 0); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, 0);
return true; return true;
} }
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, (int)texture.Width, (int)texture.Height, PixelFormat.Bgra, PixelType.UnsignedByte, data);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, data);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMagFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMagFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear); //GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
//GL.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
//GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D); //GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
return true; return true;
} }
@@ -1048,9 +1035,9 @@ namespace Vocaluxe.Lib.Draw
lock (_MutexTexture) lock (_MutexTexture)
{ {
_IDs.Enqueue(texture.Index); _IDs.Enqueue(texture.Index);
OpenTK.Graphics.OpenGL.GL.DeleteTexture(texture.ID); GL.DeleteTexture(texture.ID);
if (texture.PBO > 0) if (texture.PBO > 0)
OpenTK.Graphics.OpenGL.GL.DeleteBuffers(1, ref texture.PBO); GL.DeleteBuffers(1, ref texture.PBO);
_Textures.Remove(texture.Index); _Textures.Remove(texture.Index);
texture.Index = -1; texture.Index = -1;
texture.ID = -1; texture.ID = -1;
@@ -1114,7 +1101,7 @@ namespace Vocaluxe.Lib.Draw
if (_TextureExists(ref texture)) if (_TextureExists(ref texture))
{ {
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
float x1 = (bounds.X - rect.X) / rect.W * texture.WidthRatio; float x1 = (bounds.X - rect.X) / rect.W * texture.WidthRatio;
float x2 = (bounds.X + bounds.W - rect.X) / rect.W * texture.WidthRatio; float x2 = (bounds.X + bounds.W - rect.X) / rect.W * texture.WidthRatio;
@@ -1151,60 +1138,60 @@ namespace Vocaluxe.Lib.Draw
if (ry2 > bounds.Y + bounds.H) if (ry2 > bounds.Y + bounds.H)
ry2 = bounds.Y + bounds.H; ry2 = bounds.Y + bounds.H;
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Enable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.MatrixMode(OpenTK.Graphics.OpenGL.MatrixMode.Texture); GL.MatrixMode(MatrixMode.Texture);
OpenTK.Graphics.OpenGL.GL.PushMatrix(); GL.PushMatrix();
if (Math.Abs(rect.Rotation) > float.Epsilon) if (Math.Abs(rect.Rotation) > float.Epsilon)
{ {
OpenTK.Graphics.OpenGL.GL.Translate(0.5f, 0.5f, 0); GL.Translate(0.5f, 0.5f, 0);
OpenTK.Graphics.OpenGL.GL.Rotate(-rect.Rotation, 0f, 0f, 1f); GL.Rotate(-rect.Rotation, 0f, 0f, 1f);
OpenTK.Graphics.OpenGL.GL.Translate(-0.5f, -0.5f, 0); GL.Translate(-0.5f, -0.5f, 0);
} }
if (!mirrored) if (!mirrored)
{ {
OpenTK.Graphics.OpenGL.GL.Begin(OpenTK.Graphics.OpenGL.BeginMode.Quads); GL.Begin(BeginMode.Quads);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x1, y1); GL.TexCoord2(x1, y1);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x1, y2); GL.TexCoord2(x1, y2);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x2, y2); GL.TexCoord2(x2, y2);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x2, y1); GL.TexCoord2(x2, y1);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.End(); GL.End();
} }
else else
{ {
OpenTK.Graphics.OpenGL.GL.Begin(OpenTK.Graphics.OpenGL.BeginMode.Quads); GL.Begin(BeginMode.Quads);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x2, y2); GL.TexCoord2(x2, y2);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x2, y1); GL.TexCoord2(x2, y1);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x1, y1); GL.TexCoord2(x1, y1);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x1, y2); GL.TexCoord2(x1, y2);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.End(); GL.End();
} }
OpenTK.Graphics.OpenGL.GL.PopMatrix(); GL.PopMatrix();
OpenTK.Graphics.OpenGL.GL.Disable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Disable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
} }
@@ -1212,31 +1199,31 @@ namespace Vocaluxe.Lib.Draw
{ {
if (_TextureExists(ref texture)) if (_TextureExists(ref texture))
{ {
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Enable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.Begin(OpenTK.Graphics.OpenGL.BeginMode.Quads); GL.Begin(BeginMode.Quads);
OpenTK.Graphics.OpenGL.GL.TexCoord2(0f + begin * texture.WidthRatio, 0f); GL.TexCoord2(0f + begin * texture.WidthRatio, 0f);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X + begin * rect.W, rect.Y, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X + begin * rect.W, rect.Y, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(0f + begin * texture.WidthRatio, texture.HeightRatio); GL.TexCoord2(0f + begin * texture.WidthRatio, texture.HeightRatio);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X + begin * rect.W, rect.Y + rect.H, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X + begin * rect.W, rect.Y + rect.H, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(texture.WidthRatio * end, texture.HeightRatio); GL.TexCoord2(texture.WidthRatio * end, texture.HeightRatio);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X + end * rect.W, rect.Y + rect.H, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X + end * rect.W, rect.Y + rect.H, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.TexCoord2(texture.WidthRatio * end, 0f); GL.TexCoord2(texture.WidthRatio * end, 0f);
OpenTK.Graphics.OpenGL.GL.Vertex3(rect.X + end * rect.W, rect.Y, rect.Z + CGraphics.ZOffset); GL.Vertex3(rect.X + end * rect.W, rect.Y, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.End(); GL.End();
OpenTK.Graphics.OpenGL.GL.Disable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Disable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
} }
@@ -1257,7 +1244,7 @@ namespace Vocaluxe.Lib.Draw
if (_TextureExists(ref texture)) if (_TextureExists(ref texture))
{ {
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, texture.ID); GL.BindTexture(TextureTarget.Texture2D, texture.ID);
float x1 = (bounds.X - rect.X) / rect.W * texture.WidthRatio; float x1 = (bounds.X - rect.X) / rect.W * texture.WidthRatio;
float x2 = (bounds.X + bounds.W - rect.X) / rect.W * texture.WidthRatio; float x2 = (bounds.X + bounds.W - rect.X) / rect.W * texture.WidthRatio;
@@ -1294,44 +1281,44 @@ namespace Vocaluxe.Lib.Draw
if (ry2 > bounds.Y + bounds.H + space + height) if (ry2 > bounds.Y + bounds.H + space + height)
ry2 = bounds.Y + bounds.H + space + height; ry2 = bounds.Y + bounds.H + space + height;
OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Enable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.MatrixMode(OpenTK.Graphics.OpenGL.MatrixMode.Texture); GL.MatrixMode(MatrixMode.Texture);
OpenTK.Graphics.OpenGL.GL.PushMatrix(); GL.PushMatrix();
if (Math.Abs(rect.Rotation) > float.Epsilon) if (Math.Abs(rect.Rotation) > float.Epsilon)
{ {
OpenTK.Graphics.OpenGL.GL.Translate(0.5f, 0.5f, 0); GL.Translate(0.5f, 0.5f, 0);
OpenTK.Graphics.OpenGL.GL.Rotate(-rect.Rotation, 0f, 0f, 1f); GL.Rotate(-rect.Rotation, 0f, 0f, 1f);
OpenTK.Graphics.OpenGL.GL.Translate(-0.5f, -0.5f, 0); GL.Translate(-0.5f, -0.5f, 0);
} }
OpenTK.Graphics.OpenGL.GL.Begin(OpenTK.Graphics.OpenGL.BeginMode.Quads); GL.Begin(BeginMode.Quads);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x2, y2); GL.TexCoord2(x2, y2);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, 0f); GL.Color4(color.R, color.G, color.B, 0f);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x2, y1); GL.TexCoord2(x2, y1);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, 0f); GL.Color4(color.R, color.G, color.B, 0f);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x1, y1); GL.TexCoord2(x1, y1);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
OpenTK.Graphics.OpenGL.GL.TexCoord2(x1, y2); GL.TexCoord2(x1, y2);
OpenTK.Graphics.OpenGL.GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset); GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset);
OpenTK.Graphics.OpenGL.GL.End(); GL.End();
OpenTK.Graphics.OpenGL.GL.PopMatrix(); GL.PopMatrix();
OpenTK.Graphics.OpenGL.GL.Disable(OpenTK.Graphics.OpenGL.EnableCap.Blend); GL.Disable(EnableCap.Blend);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
} }
#endregion drawing #endregion drawing
@@ -1360,11 +1347,10 @@ namespace Vocaluxe.Lib.Draw
{ {
try try
{ {
OpenTK.Graphics.OpenGL.GL.GenBuffers(1, out texture.PBO); GL.GenBuffers(1, out texture.PBO);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, texture.PBO); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, texture.PBO);
OpenTK.Graphics.OpenGL.GL.BufferData(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, (IntPtr)q.Data.Length, IntPtr.Zero, GL.BufferData(BufferTarget.PixelUnpackBuffer, (IntPtr)q.Data.Length, IntPtr.Zero, BufferUsageHint.StreamDraw);
OpenTK.Graphics.OpenGL.BufferUsageHint.StreamDraw); GL.BindBuffer(BufferTarget.PixelUnpackBuffer, 0);
OpenTK.Graphics.OpenGL.GL.BindBuffer(OpenTK.Graphics.OpenGL.BufferTarget.PixelUnpackBuffer, 0);
} }
catch (Exception) catch (Exception)
{ {
@@ -1373,8 +1359,8 @@ namespace Vocaluxe.Lib.Draw
} }
} }
int id = OpenTK.Graphics.OpenGL.GL.GenTexture(); int id = GL.GenTexture();
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, id); GL.BindTexture(TextureTarget.Texture2D, id);
texture.ID = id; texture.ID = id;
texture.Width = q.Width; texture.Width = q.Width;
@@ -1385,28 +1371,20 @@ namespace Vocaluxe.Lib.Draw
texture.WidthRatio = texture.Width / texture.W2; texture.WidthRatio = texture.Width / texture.W2;
texture.HeightRatio = texture.Height / texture.H2; texture.HeightRatio = texture.Height / texture.H2;
OpenTK.Graphics.OpenGL.GL.TexImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, OpenTK.Graphics.OpenGL.PixelInternalFormat.Rgba, (int)texture.W2, GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, (int)texture.W2, (int)texture.H2, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
(int)texture.H2, 0,
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, IntPtr.Zero);
OpenTK.Graphics.OpenGL.GL.TexSubImage2D(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0, 0, 0, q.Width, q.Height, GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, q.Width, q.Height, PixelFormat.Bgra, PixelType.UnsignedByte, q.Data);
OpenTK.Graphics.OpenGL.PixelFormat.Bgra, OpenTK.Graphics.OpenGL.PixelType.UnsignedByte, q.Data);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureWrapS, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureParameterName.ClampToEdge);
(int)OpenTK.Graphics.OpenGL.TextureParameterName.ClampToEdge); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureWrapT,
(int)OpenTK.Graphics.OpenGL.TextureParameterName.ClampToEdge);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMagFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
(int)OpenTK.Graphics.OpenGL.TextureMagFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter,
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.Linear);
OpenTK.Graphics.OpenGL.GL.TexParameter(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, OpenTK.Graphics.OpenGL.TextureParameterName.TextureMinFilter, GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
(int)OpenTK.Graphics.OpenGL.TextureMinFilter.LinearMipmapLinear); GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.Ext.GenerateMipmap(OpenTK.Graphics.OpenGL.GenerateMipmapTarget.Texture2D);
OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
// Add to Texture List // Add to Texture List
texture.Color = new SColorF(1f, 1f, 1f, 1f); texture.Color = new SColorF(1f, 1f, 1f, 1f);
+2 -2
View File
@@ -26,10 +26,10 @@ namespace Vocaluxe.Lib.Sound
class CGstreamerAudio : IPlayback class CGstreamerAudio : IPlayback
{ {
//static float LastPosition; //static float LastPosition;
private CGstreamerAudioWrapper.LogCallback _LogCallback; private readonly CGstreamerAudioWrapper.LogCallback _LogCallback;
#region log #region log
private void _LogHandler(string text) private static void _LogHandler(string text)
{ {
CLog.LogError(text); CLog.LogError(text);
} }
@@ -26,13 +26,13 @@ namespace Vocaluxe.Lib.Sound.Gstreamer
#region arch #region arch
#if ARCH_X86 #if ARCH_X86
#if WIN #if WIN
private const string _Dll = "x86\\gstreamer\\gstreamerhelper.dll"; private const string _Dll = "x86\\gstreamer\\GstreamerHelper.dll";
#endif #endif
#endif #endif
#if ARCH_X64 #if ARCH_X64
#if WIN #if WIN
private const string _Dll = "x64\\gstreamer\\gstreamerhelper.dll"; private const string _Dll = "x64\\gstreamer\\GstreamerHelper.dll";
#endif #endif
#endif #endif
#endregion arch #endregion arch
+4 -2
View File
@@ -202,9 +202,9 @@ namespace Vocaluxe
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show("Error on start up: " + e.Message + e.StackTrace); MessageBox.Show("Error on start up: " + e.Message + e.StackTrace);
CLog.LogError("Error on start up: " + e.Message + e.StackTrace); CLog.LogError("Error on start up: " + e);
_SplashScreen.Close();
_CloseProgram(); _CloseProgram();
Environment.Exit(Environment.ExitCode);
} }
Application.DoEvents(); Application.DoEvents();
@@ -229,6 +229,7 @@ namespace Vocaluxe
CWebcam.Close(); CWebcam.Close();
} }
catch (Exception) {} catch (Exception) {}
Environment.Exit(Environment.ExitCode);
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
@@ -243,6 +244,7 @@ namespace Vocaluxe
catch {} catch {}
MessageBox.Show("Unhandled exception: " + e.Message + stackTrace); MessageBox.Show("Unhandled exception: " + e.Message + stackTrace);
CLog.LogError("Unhandled exception: " + e.Message + stackTrace); CLog.LogError("Unhandled exception: " + e.Message + stackTrace);
_CloseProgram();
} }
private static Assembly _AssemblyResolver(Object sender, ResolveEventArgs args) private static Assembly _AssemblyResolver(Object sender, ResolveEventArgs args)
+3 -2
View File
@@ -19,6 +19,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Forms; using System.Windows.Forms;
using Vocaluxe.Base; using Vocaluxe.Base;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
@@ -1007,7 +1008,7 @@ namespace Vocaluxe.Screens
if (CSongs.IsInCategory) if (CSongs.IsInCategory)
{ {
//TODO: Check and use sorting method //TODO: Check and use sorting method
var songs = CSongs.VisibleSongs; ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs;
int ct = songs.Count; int ct = songs.Count;
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
start = curSelected + 1; start = curSelected + 1;
@@ -1017,7 +1018,7 @@ namespace Vocaluxe.Screens
} }
else else
{ {
var categories = CSongs.Categories; ReadOnlyCollection<CCategory> categories = CSongs.Categories;
int ct = categories.Count; int ct = categories.Count;
if (curSelected >= 0 && curSelected < ct - 1 && categories[curSelected].Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) if (curSelected >= 0 && curSelected < ct - 1 && categories[curSelected].Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
start = curSelected + 1; start = curSelected + 1;
-10
View File
@@ -93,16 +93,6 @@ namespace VocaluxeLib.Menu
X32 = 32 X32 = 32
} }
public enum EColorDepth
{
// ReSharper disable UnusedMember.Global
Bit8 = 8,
Bit16 = 16,
Bit24 = 24,
Bit32 = 32
// ReSharper restore UnusedMember.Global
}
public enum ETextureQuality public enum ETextureQuality
{ {
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
+1
View File
@@ -244,6 +244,7 @@ namespace VocaluxeLib.Menu
int GetNumSongsVisible(); int GetNumSongsVisible();
int GetNumCategories(); int GetNumCategories();
int NumSongsInCategory(int categoryIndex); int NumSongsInCategory(int categoryIndex);
bool IsInCategory();
int GetCurrentCategoryIndex(); int GetCurrentCategoryIndex();
EOffOn GetTabs(); EOffOn GetTabs();
+20 -1
View File
@@ -1,4 +1,23 @@
using System.Collections.Generic; #region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System.Collections.Generic;
namespace VocaluxeLib.Menu.SongMenu namespace VocaluxeLib.Menu.SongMenu
{ {
@@ -559,7 +559,7 @@ namespace VocaluxeLib.Menu.SongMenu
{ {
if (!_Initialized) if (!_Initialized)
return false; return false;
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 || _PreviewSelected < 0 || _PreviewSelected >= CBase.Songs.GetNumCategories()) if (CBase.Songs.IsInCategory() || _PreviewSelected < 0 || _PreviewSelected >= CBase.Songs.GetNumCategories())
return false; return false;
_EnterCategory(_PreviewSelected); _EnterCategory(_PreviewSelected);
return true; return true;
@@ -582,7 +582,7 @@ namespace VocaluxeLib.Menu.SongMenu
if (!_Initialized) if (!_Initialized)
return; return;
if (CBase.Songs.GetCurrentCategoryIndex() == -1) if (!CBase.Songs.IsInCategory())
return; return;
_Reset(); _Reset();
@@ -596,7 +596,7 @@ namespace VocaluxeLib.Menu.SongMenu
protected void _SelectSong(int nr) protected void _SelectSong(int nr)
{ {
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Songs.GetNumSongsVisible() > 0) && (nr >= 0) && ((_Actsong != nr) || (_Streams.Count == 0))) if (CBase.Songs.IsInCategory() && (CBase.Songs.GetNumSongsVisible() > 0) && (nr >= 0) && ((_Actsong != nr) || (_Streams.Count == 0)))
{ {
_Streams.ForEach(soundStream => CBase.Sound.FadeAndStop(soundStream, 0f, 1f)); _Streams.ForEach(soundStream => CBase.Sound.FadeAndStop(soundStream, 0f, 1f));
_Streams.Clear(); _Streams.Clear();
+19 -19
View File
@@ -129,7 +129,7 @@ namespace VocaluxeLib.Menu.SongMenu
public override void OnShow() public override void OnShow()
{ {
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Songs.GetNumCategories() > 0 && CBase.Songs.GetCurrentCategoryIndex() == -1) if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Songs.GetNumCategories() > 0 && !CBase.Songs.IsInCategory())
_EnterCategory(0); _EnterCategory(0);
_ActualSelection = -1; _ActualSelection = -1;
_Locked = -1; _Locked = -1;
@@ -201,7 +201,7 @@ namespace VocaluxeLib.Menu.SongMenu
switch (keyEvent.Key) switch (keyEvent.Key)
{ {
case Keys.Enter: case Keys.Enter:
if (CBase.Songs.GetCurrentCategoryIndex() < 0) if (!CBase.Songs.IsInCategory())
{ {
_EnterCategory(_PreviewSelected); _EnterCategory(_PreviewSelected);
keyEvent.Handled = true; keyEvent.Handled = true;
@@ -212,7 +212,7 @@ namespace VocaluxeLib.Menu.SongMenu
case Keys.Escape: case Keys.Escape:
case Keys.Back: case Keys.Back:
if (CBase.Songs.GetCurrentCategoryIndex() > -1 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && songOptions.Selection.CategoryChangeAllowed) if (CBase.Songs.IsInCategory() && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && songOptions.Selection.CategoryChangeAllowed)
{ {
_ShowCategories(); _ShowCategories();
keyEvent.Handled = true; keyEvent.Handled = true;
@@ -234,7 +234,7 @@ namespace VocaluxeLib.Menu.SongMenu
break; break;
case Keys.Left: case Keys.Left:
if (_Locked > 0 && (!songOptions.Selection.RandomOnly || songOptions.Selection.CategoryChangeAllowed && CBase.Songs.GetCurrentCategoryIndex() < 0)) if (_Locked > 0 && (!songOptions.Selection.RandomOnly || songOptions.Selection.CategoryChangeAllowed && !CBase.Songs.IsInCategory()))
{ {
_Locked--; _Locked--;
_UpdateList(); _UpdateList();
@@ -242,7 +242,7 @@ namespace VocaluxeLib.Menu.SongMenu
break; break;
case Keys.Right: case Keys.Right:
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && songOptions.Selection.CategoryChangeAllowed) if (!CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed)
{ {
if (_Locked < CBase.Songs.GetNumCategories() - 1) if (_Locked < CBase.Songs.GetNumCategories() - 1)
{ {
@@ -252,7 +252,7 @@ namespace VocaluxeLib.Menu.SongMenu
} }
else else
{ {
if (CBase.Songs.GetCurrentCategoryIndex() != -1 && _Locked < CBase.Songs.GetNumSongsVisible() - 1 && !songOptions.Selection.RandomOnly) if (CBase.Songs.IsInCategory() && _Locked < CBase.Songs.GetNumSongsVisible() - 1 && !songOptions.Selection.RandomOnly)
{ {
_Locked++; _Locked++;
_UpdateList(); _UpdateList();
@@ -268,7 +268,7 @@ namespace VocaluxeLib.Menu.SongMenu
} }
if (_Locked > _NumW - 1 && if (_Locked > _NumW - 1 &&
(!songOptions.Selection.RandomOnly || songOptions.Selection.CategoryChangeAllowed && CBase.Songs.GetCurrentCategoryIndex() < 0)) (!songOptions.Selection.RandomOnly || songOptions.Selection.CategoryChangeAllowed && !CBase.Songs.IsInCategory()))
{ {
_Locked -= _NumW; _Locked -= _NumW;
_UpdateList(); _UpdateList();
@@ -282,7 +282,7 @@ namespace VocaluxeLib.Menu.SongMenu
break; break;
} }
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && songOptions.Selection.CategoryChangeAllowed) if (!CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed)
{ {
if (_Locked < CBase.Songs.GetNumCategories() - _NumW) if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
{ {
@@ -318,13 +318,13 @@ namespace VocaluxeLib.Menu.SongMenu
bool sel = false; bool sel = false;
int lastselection = _ActualSelection; int lastselection = _ActualSelection;
if (!songOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && songOptions.Selection.CategoryChangeAllowed) if (!songOptions.Selection.RandomOnly || !CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed)
{ {
foreach (CStatic tile in _Tiles) foreach (CStatic tile in _Tiles)
{ {
if ((tile.Texture.Index != _CoverTexture.Index) && CHelper.IsInBounds(tile.Rect, mouseEvent) && !sel) if ((tile.Texture.Index != _CoverTexture.Index) && CHelper.IsInBounds(tile.Rect, mouseEvent) && !sel)
{ {
if (mouseEvent.LB || CBase.Songs.GetCurrentCategoryIndex() == -1) if (mouseEvent.LB || !CBase.Songs.IsInCategory())
{ {
if (_PreviewSelected == i + _Offset) if (_PreviewSelected == i + _Offset)
_Locked = _PreviewSelected; _Locked = _PreviewSelected;
@@ -352,7 +352,7 @@ namespace VocaluxeLib.Menu.SongMenu
if (!sel) if (!sel)
_ActualSelection = -1; _ActualSelection = -1;
if (mouseEvent.RB && (CBase.Songs.GetNumCategories() > 0) && CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && if (mouseEvent.RB && (CBase.Songs.GetNumCategories() > 0) && CBase.Songs.IsInCategory() && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON &&
songOptions.Selection.CategoryChangeAllowed) songOptions.Selection.CategoryChangeAllowed)
{ {
_ShowCategories(); _ShowCategories();
@@ -366,7 +366,7 @@ namespace VocaluxeLib.Menu.SongMenu
if (CHelper.IsInBounds(_CoverBig.Rect, mouseEvent) || CHelper.IsInBounds(_TextBG.Rect, mouseEvent)) if (CHelper.IsInBounds(_CoverBig.Rect, mouseEvent) || CHelper.IsInBounds(_TextBG.Rect, mouseEvent))
_Locked = _PreviewSelected; _Locked = _PreviewSelected;
} }
else if (mouseEvent.LB && (CBase.Songs.GetCurrentCategoryIndex() == -1)) else if (mouseEvent.LB && (!CBase.Songs.IsInCategory()))
{ {
foreach (CStatic tile in _Tiles) foreach (CStatic tile in _Tiles)
{ {
@@ -380,7 +380,7 @@ namespace VocaluxeLib.Menu.SongMenu
} }
if (mouseEvent.Wheel != 0 && CHelper.IsInBounds(_ScrollRect, mouseEvent) && if (mouseEvent.Wheel != 0 && CHelper.IsInBounds(_ScrollRect, mouseEvent) &&
(!songOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && songOptions.Selection.CategoryChangeAllowed)) (!songOptions.Selection.RandomOnly || !CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed))
_UpdateList(_Offset + _NumW * mouseEvent.Wheel); _UpdateList(_Offset + _NumW * mouseEvent.Wheel);
} }
@@ -389,17 +389,17 @@ namespace VocaluxeLib.Menu.SongMenu
foreach (CStatic tile in _Tiles) foreach (CStatic tile in _Tiles)
{ {
if (tile.Selected && _Active) if (tile.Selected && _Active)
tile.Draw(1.2f, tile.Rect.Z - 0.1f, EAspect.Crop, false); tile.Draw(1.2f, tile.Rect.Z - 0.1f, EAspect.Crop);
else else
{ {
if (tile.Texture.Index != _CoverTexture.Index) if (tile.Texture.Index != _CoverTexture.Index)
tile.Draw(1f, tile.Rect.Z, EAspect.Crop, false); tile.Draw(1f, tile.Rect.Z, EAspect.Crop);
else else
tile.Draw(1f, tile.Rect.Z, EAspect.Stretch, false); tile.Draw(1f, tile.Rect.Z, EAspect.Stretch);
} }
} }
if (CBase.Songs.GetCurrentCategoryIndex() >= 0) if (CBase.Songs.IsInCategory())
{ {
int actsong = _PreviewSelected; int actsong = _PreviewSelected;
if ((CBase.Songs.GetNumSongsVisible() > actsong) && (actsong >= 0)) if ((CBase.Songs.GetNumSongsVisible() > actsong) && (actsong >= 0))
@@ -490,7 +490,7 @@ namespace VocaluxeLib.Menu.SongMenu
return new CStatic(_PartyModeID); return new CStatic(_PartyModeID);
} }
protected void _SetSelectedTile(int itemNr) private void _SetSelectedTile(int itemNr)
{ {
bool sel = _Tiles.Any(tile => tile.Selected); bool sel = _Tiles.Any(tile => tile.Selected);
@@ -607,7 +607,7 @@ namespace VocaluxeLib.Menu.SongMenu
private void _UpdateList(int offset, bool force = false) private void _UpdateList(int offset, bool force = false)
{ {
bool isInCategory = CBase.Songs.GetCurrentCategoryIndex() >= 0; bool isInCategory = CBase.Songs.IsInCategory();
int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories(); int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
if (offset >= (itemCount / _NumW) * _NumW - (_NumW * (_NumH - 1))) if (offset >= (itemCount / _NumW) * _NumW - (_NumW * (_NumH - 1)))
+11 -8
View File
@@ -19,7 +19,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants> <DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -29,7 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -41,7 +41,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants> <DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -52,7 +52,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -64,7 +64,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants> <DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -74,7 +74,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -86,7 +86,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants> <DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -96,7 +96,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -154,6 +154,9 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)Output\" /I /Y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">