Skip to content

Commit 4da78d2

Browse files
authored
Merge pull request #49 from meokullu/new_version_0001
v1.8.0 simplified and added melodies, console title upto eight parame…
2 parents 43803b0 + a71f7c8 commit 4da78d2

File tree

5 files changed

+356
-52
lines changed

5 files changed

+356
-52
lines changed

CHANGELOG.md

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

14+
### [1.8.0]
15+
#### Added
16+
* `SetConsoleTitle(..., string fourthText)`, `SetConsoleTitle(..., string fifthText)`, `SetConsoleTitle(..., string sixthText)`, `SetConsoleTitle(..., string seventhText)`, `SetConsoleTitle(..., string eighthText)` methods are added.
17+
* `Error` and `Fail` melodies are added.
18+
19+
#### Changed
20+
* SetConsoleTitle method series are expanded from three to eigth componenents.
21+
* `ClearConsoleTitle()` now clears all eigth values.
22+
* Fixing punctations on method summaries on Title.cs.
23+
* `StartingUp` and `EndingUp` melodies are now public variables.
24+
* All melodies are simplified.
25+
1426
### [1.7.0]
1527
#### Added
1628
* `Write<T>(T value, ConsoleColor bgColor, ConsoleColor fgColor)`, `WriteLine<T>(T value, ConsoleColor bgColor, ConsoleColor fgColor)` method added for write text with given foreground and background color.

HelpConsole/HelpConsole.csproj

Lines changed: 6 additions & 5 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.7.0</FileVersion>
7-
<AssemblyVersion>1.7.0</AssemblyVersion>
8-
<Version>1.7.0</Version>
6+
<FileVersion>1.8.0</FileVersion>
7+
<AssemblyVersion>1.8.0</AssemblyVersion>
8+
<Version>1.8.0</Version>
99
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
1010
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1111
<Title>Help Console</Title>
@@ -14,8 +14,9 @@
1414
<Copyright>Enes Okullu</Copyright>
1515
<PackageTags>console; console-application; console-app; helper</PackageTags>
1616
<PackageReleaseNotes>
17-
v1.7.0
18-
* Methods for writing with given background color are added. Methods for array of generic data are added.
17+
v1.8.0
18+
* ConsoleTitle() can be used with upto eight parameters.
19+
* New melodies and simplified current ones.
1920
See changelog (https://github.com/meokullu/HelpConsole/blob/master/CHANGELOG.md)
2021
</PackageReleaseNotes>
2122
<RepositoryUrl>https://github.com/meokullu/HelpConsole</RepositoryUrl>

HelpConsole/src/ConsoleOption.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,6 @@ public class ConsoleOption
6464
/// </summary>
6565
public partial class HelpConsole
6666
{
67-
#region Melodies
68-
69-
// Start up beeping frequency and duration. Total duration 500 ms.
70-
private static readonly Melody s_startUpMelody = new Melody { Notes = new int[] { 440, 190, 60, 660, 190, 60 } };
71-
72-
// Finish up beeping frequency and duration. Total duration 1.000 ms.
73-
private static readonly Melody s_finishUpMelody = new Melody { Notes = new int[] { 1250, 400, 100, 1000, 400, 100 } };
74-
75-
#endregion Melodies
76-
7767
/// <summary>
7868
/// Starting up.
7969
/// </summary>
@@ -107,7 +97,7 @@ public static void StartUp(ConsoleOption consoleOptions = null)
10797
if (consoleOptions.WarningSound)
10898
{
10999
// Beep sound.
110-
Beep(s_startUpMelody);
100+
Beep(StartingUp);
111101
}
112102
}
113103

@@ -130,7 +120,7 @@ public static void FinishUp()
130120
if (ConsoleOptions.WarningSound)
131121
{
132122
// Beeping.
133-
Beep(s_finishUpMelody);
123+
Beep(FinishingUp);
134124
}
135125

136126
// Checking if WaitOnEnd is true.

HelpConsole/src/Melody.cs

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,43 @@ public class Melody
1414
}
1515

1616
/// <summary>
17-
/// Beep for warning. Total duration: 500 ms.
17+
/// Beep for welcome.
1818
/// </summary>
19-
public static Melody Warning = new Melody { Notes = new int[] { 440, 190, 60, 440, 190, 60 } };
19+
public static Melody Welcome = new Melody { Notes = new int[] { 640, 200, 100, 530, 200, 100, 520, 200, 100 } };
2020

2121
/// <summary>
22-
/// Beep for welcome. Total duration: 1.500 ms.
22+
/// Beep for warning.
2323
/// </summary>
24-
public static Melody Welcome = new Melody { Notes = new int[] { 2000, 400, 100, 1750, 400, 100, 1500, 400, 100 } };
24+
public static Melody Warning = new Melody { Notes = new int[] { 660, 250, 90, 660, 250, 90, 660, 250, 60} };
25+
26+
/// <summary>
27+
///
28+
/// </summary>
29+
public static Melody Error = new Melody { Notes = new int[] { 554, 750, 250, 554, 750, 250, 554, 250, 558} };
2530

2631
/// <summary>
2732
/// Beep for success.
2833
/// </summary>
29-
public static Melody Success = new Melody { Notes = new int[] { 750, 225, 75, 650, 225, 75, 850, 225, 275, 450, 225, 75 } };
34+
public static Melody Success = new Melody { Notes = new int[] { 800, 200, 100, 800, 250, 150, 800, 250, 200} };
35+
36+
/// <summary>
37+
/// Beep for fail.
38+
/// </summary>
39+
public static Melody Fail = new Melody { Notes = new int[] { 340, 750, 500, 340, 750, 500} };
40+
41+
42+
#region Melodies
43+
44+
/// <summary>
45+
/// Start up beeping frequency and duration.
46+
/// </summary>
47+
public static Melody StartingUp = new Melody { Notes = new int[] { 440, 190, 60, 660, 190, 60 } };
48+
49+
/// <summary>
50+
/// Finish up beeping frequency and duration.
51+
/// </summary>
52+
public static Melody FinishingUp = new Melody { Notes = new int[] { 720, 400, 100, 720, 400, 100 } };
53+
54+
#endregion Melodies
3055
}
3156
}

0 commit comments

Comments
 (0)