Skip to content

Commit 0e93dce

Browse files
authored
Merge pull request #43 from meokullu/beep_fix_0002
v1.6.1 hotfix for Beep()
2 parents fbd9ea3 + 1390e4e commit 0e93dce

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
#### Removed
1212
-->
1313

14+
### [1.6.1]
15+
16+
#### Fixed
17+
* [Hotfix]: Beep(Melody melody) was writing error on notes when duration of waiting as third element is zero.
18+
1419
### [1.6.0]
1520

1621
#### Added

HelpConsole/HelpConsole.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<PropertyGroup>
44
<TargetFrameworks>net6.0; net7.0; net461; netcoreapp3.1; netstandard2.0</TargetFrameworks>
55
<ImplicitUsings>disable</ImplicitUsings>
6-
<FileVersion>1.6.0</FileVersion>
7-
<AssemblyVersion>1.6.0</AssemblyVersion>
8-
<Version>1.6.0</Version>
6+
<FileVersion>1.6.1</FileVersion>
7+
<AssemblyVersion>1.6.1</AssemblyVersion>
8+
<Version>1.6.1</Version>
99
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
1010
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1111
<Title>Help Console</Title>
@@ -14,11 +14,12 @@
1414
<Copyright>Enes Okullu</Copyright>
1515
<PackageTags>console; console-application; console-app; helper</PackageTags>
1616
<PackageReleaseNotes>
17-
v1.6.0
17+
v1.6.1
1818
* Beep(Melody melody) was checking Melody elements with checking duration of beeping and duration of waiting as not being lower than zero. Now it is checking with equal or lower than zero as it should be.
1919
* SleepWithTitle(int duration) method added instead of Sleep(int duration). It writes sleeping duration into Console's title.
2020
* Sleep(int duration) now only waits instead of writing sleeping duration into screen.
2121
* Several features were not working due to default values of ConsoleOptions and ScreenColorOptions. Features like WriteLine() or StartingMethod() now can be used without calling `StartUp()`.
22+
* [Hotfix]: Beep(Melody melody) was writing error on notes when duration of waiting as third element is zero.
2223
See changelog (https://github.com/meokullu/HelpConsole/blob/master/CHANGELOG.md)
2324
</PackageReleaseNotes>
2425
<RepositoryUrl>https://github.com/meokullu/HelpConsole</RepositoryUrl>

HelpConsole/src/Beep.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static void Beep(Melody melody)
8888
if (melody.Notes[i + 1] <= 0 || melody.Notes[i + 2] <= 0)
8989
{
9090
//
91-
WriteLine($"Error on notes. Notes at index: {i + 1}/{i + 2} {(melody.Notes[i + 1] < 0 ? "beeping duration should be greater than 0" : "")} {(melody.Notes[i + 2] < 0 ? "waiting duration should be greater than 0" : "")}");
91+
WriteLine($"Error on notes. Notes at index: {i + 1}/{i + 2} {(melody.Notes[i + 1] <= 0 ? "beeping duration should be greater than 0" : "")} {(melody.Notes[i + 2] <= 0 ? "waiting duration should be greater than 0" : "")}");
9292

9393
//
9494
continue;

HelpConsole/src/Method.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public partial class HelpConsole
1313
/// <summary>
1414
/// Melody whose played when <see cref="StartingMethod(string)"/> is called.
1515
/// </summary>
16-
private static Melody s_startMethodMelody = new Melody { Notes = new int[] { 725, 500, 0 } };
16+
private static Melody s_startMethodMelody = new Melody { Notes = new int[] { 725, 300, 20 } };
1717

1818
/// <summary>
1919
/// Sets melody that is played when <see cref="StartingMethod(string)"/> is called.
@@ -28,7 +28,7 @@ public static void SetStartMethodMelody(Melody melody)
2828
/// <summary>
2929
/// Melody whose played when <see cref="EndingMethod(string)"/> is called.
3030
/// </summary>
31-
private static Melody s_endMethodMelody = new Melody { Notes = new int[] { 525, 500, 0 } };
31+
private static Melody s_endMethodMelody = new Melody { Notes = new int[] { 525, 300, 20 } };
3232

3333
/// <summary>
3434
/// Sets melody that is played when <see cref="EndingMethod(string)"/> is called.

0 commit comments

Comments
 (0)