diff --git a/BASSdotNetExample/Program.cs b/BASSdotNetExample/Program.cs index e8b5c5a..1fbe57e 100644 --- a/BASSdotNetExample/Program.cs +++ b/BASSdotNetExample/Program.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -7,6 +7,8 @@ using System.Threading; using System.Threading.Tasks; using BASSdotNET; +using AnyConsole; +using System.Drawing; namespace BASSdotNetExample { @@ -32,6 +34,22 @@ public static string Utf16ToUtf8(string utf16String) } static void Main(string[] args) { + var console = new ExtendedConsole(); + console.Configure(config => + { + config.SetStaticRow("Header", RowLocation.Top, Color.White, Color.DarkRed); + config.SetStaticRow("SubHeader", RowLocation.Top, 1, Color.White, Color.FromArgb(30, 30, 30)); + config.SetStaticRow("Footer", RowLocation.Bottom, Color.White, Color.DarkBlue); + config.SetLogHistoryContainer(RowLocation.Top, 2); + config.SetUpdateInterval(TimeSpan.FromMilliseconds(100)); + config.SetMaxHistoryLines(1000); + config.SetQuitHandler((consoleInstance) => { + Console.Write("Quiting..."); + Environment.Exit(3021); + }); + }); + console.Start(); + console.Title = "BASS.NET Example Console Edition by RiritoNinigaya"; Console.WriteLine("Hello World from BASS.NET Library!!!"); BASS bass = new BASS(); if(bass.Init_Bass(-1, 48000, 0, 0, 0)) @@ -46,12 +64,8 @@ static void Main(string[] args) Console.WriteLine("BASS.DLL IS FAILED TO CREATING FILE STREAM!!!"); Environment.Exit(323); } - //Console.WriteLine(str); //This is Not Necessary, if you cannot Initializating WAV Sound or MP3 Sound bass.ChannelPlay(str, false); - while(true) - { - Thread.Sleep(4000); - } + console.WaitForClose(); } } }