Skip to content

Commit

Permalink
Add lang file, ...
Browse files Browse the repository at this point in the history
  • Loading branch information
hoang3402 committed Dec 12, 2022
1 parent 682ae8f commit 2277b2e
Show file tree
Hide file tree
Showing 9 changed files with 456 additions and 165 deletions.
3 changes: 2 additions & 1 deletion LTWindows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33110.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LTWindows", "LTWindows\LTWindows.csproj", "{082D1086-846A-4D1E-8DBC-08BA8DAD2B99}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LTWindows", "LTWindows\LTWindows.csproj", "{082D1086-846A-4D1E-8DBC-08BA8DAD2B99}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -20,6 +20,7 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
RESX_NeutralResourcesLanguage = vi-VN
SolutionGuid = {46D3B702-0E82-438F-AE3A-FF2A3E34584B}
EndGlobalSection
EndGlobal
18 changes: 17 additions & 1 deletion LTWindows/Core/Matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static Matrix Plus(Matrix a, Matrix b)
if (a.SoCot != b.SoCot || a.SoDong != b.SoDong)
{
MessageBox.Show("Không tính được!");
return null;
return null;
}

Matrix result = new(a.SoCot, a.SoDong);
Expand All @@ -93,5 +93,21 @@ public static Matrix Plus(Matrix a, Matrix b)
return result;
}


public static bool isUpperTriangular(Matrix a)
{
if (!a.isSquare) return false;

for (int i = 0; i < a.SoDong; i++)
{
for (int j = i + 1; j < a.SoCot; j++)
{
if (a.matrix[i, j] != 0) return false;
}
}

return true;
}

}
}
10 changes: 10 additions & 0 deletions LTWindows/LTWindows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,23 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Lang\Resource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Lang\Resource.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
<CustomToolNamespace>LTWindows.Language</CustomToolNamespace>
</EmbeddedResource>
</ItemGroup>

</Project>
88 changes: 60 additions & 28 deletions LTWindows/MainView.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2277b2e

Please sign in to comment.