From 61ed8a3ffb60d2a037dc0bd2b5b0a47e53670b69 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 24 Nov 2021 17:19:15 -0500 Subject: Removed .NET files; Now using Godot as the base of the audio player --- .gitignore | 45 ++++----------- .idea/.idea.Erable/.idea/.gitignore | 13 ----- .idea/.idea.Erable/.idea/discord.xml | 6 -- .idea/.idea.Erable/.idea/encodings.xml | 4 -- .idea/.idea.Erable/.idea/indexLayout.xml | 8 --- .idea/.idea.Erable/.idea/vcs.xml | 6 -- Erable.sln | 48 ---------------- Erable/App.axaml | 12 ---- Erable/App.axaml.cs | 49 ---------------- Erable/Assets/avalonia-logo.ico | Bin 176111 -> 0 bytes Erable/Assets/erable.png | Bin 76609 -> 0 bytes Erable/DiscordRPC.cs | 76 ------------------------- Erable/Erable.csproj | 52 ----------------- Erable/Program.cs | 65 --------------------- Erable/ViewLocator.cs | 51 ----------------- Erable/ViewModels/MainWindowViewModel.cs | 82 --------------------------- Erable/ViewModels/ViewModelBase.cs | 30 ---------- Erable/Views/About.axaml | 17 ------ Erable/Views/About.axaml.cs | 49 ---------------- Erable/Views/MainWindow.axaml | 36 ------------ Erable/Views/MainWindow.axaml.cs | 55 ------------------ Erable/Views/MessageBox.axaml | 19 ------- Erable/Views/MessageBox.axaml.cs | 93 ------------------------------- Sirop.Backend/Playback.cs | 50 ----------------- Sirop.Backend/Sirop.Backend.csproj | 14 ----- Sirop.Backend/Version.cs | 8 --- appveyor.yml | 9 --- project.godot | 18 ++++++ 28 files changed, 29 insertions(+), 886 deletions(-) delete mode 100644 .idea/.idea.Erable/.idea/.gitignore delete mode 100644 .idea/.idea.Erable/.idea/discord.xml delete mode 100644 .idea/.idea.Erable/.idea/encodings.xml delete mode 100644 .idea/.idea.Erable/.idea/indexLayout.xml delete mode 100644 .idea/.idea.Erable/.idea/vcs.xml delete mode 100644 Erable.sln delete mode 100644 Erable/App.axaml delete mode 100644 Erable/App.axaml.cs delete mode 100644 Erable/Assets/avalonia-logo.ico delete mode 100644 Erable/Assets/erable.png delete mode 100644 Erable/DiscordRPC.cs delete mode 100644 Erable/Erable.csproj delete mode 100644 Erable/Program.cs delete mode 100644 Erable/ViewLocator.cs delete mode 100644 Erable/ViewModels/MainWindowViewModel.cs delete mode 100644 Erable/ViewModels/ViewModelBase.cs delete mode 100644 Erable/Views/About.axaml delete mode 100644 Erable/Views/About.axaml.cs delete mode 100644 Erable/Views/MainWindow.axaml delete mode 100644 Erable/Views/MainWindow.axaml.cs delete mode 100644 Erable/Views/MessageBox.axaml delete mode 100644 Erable/Views/MessageBox.axaml.cs delete mode 100644 Sirop.Backend/Playback.cs delete mode 100644 Sirop.Backend/Sirop.Backend.csproj delete mode 100644 Sirop.Backend/Version.cs delete mode 100644 appveyor.yml create mode 100644 project.godot diff --git a/.gitignore b/.gitignore index bc4c65f..4f48ad7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,11 @@ -# Common IntelliJ Platform excludes - -# User specific -**/.idea/**/workspace.xml -**/.idea/**/tasks.xml -**/.idea/shelf/* -**/.idea/dictionaries -**/.idea/httpRequests/ - -# Sensitive or high-churn files -**/.idea/**/dataSources/ -**/.idea/**/dataSources.ids -**/.idea/**/dataSources.xml -**/.idea/**/dataSources.local.xml -**/.idea/**/sqlDataSources.xml -**/.idea/**/dynamic.xml - -# Rider -# Rider auto-generates .iml files, and contentModel.xml -**/.idea/**/*.iml -**/.idea/**/contentModel.xml -**/.idea/**/modules.xml - -*.suo -*.user -.vs/ -[Bb]in/ -[Oo]bj/ -_UpgradeReport_Files/ -[Pp]ackages/ - -Thumbs.db -Desktop.ini -.DS_Store +# Godot-specific ignores +.import/ +export.cfg +export_presets.cfg + +# Imported translations (automatically generated from CSV files) +*.translation + +# Mono-specific ignores +.mono/ +data_*/ diff --git a/.idea/.idea.Erable/.idea/.gitignore b/.idea/.idea.Erable/.idea/.gitignore deleted file mode 100644 index 0500096..0000000 --- a/.idea/.idea.Erable/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/modules.xml -/contentModel.xml -/projectSettingsUpdater.xml -/.idea.Erable.iml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/.idea.Erable/.idea/discord.xml b/.idea/.idea.Erable/.idea/discord.xml deleted file mode 100644 index cd711a0..0000000 --- a/.idea/.idea.Erable/.idea/discord.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/.idea.Erable/.idea/encodings.xml b/.idea/.idea.Erable/.idea/encodings.xml deleted file mode 100644 index df87cf9..0000000 --- a/.idea/.idea.Erable/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/.idea.Erable/.idea/indexLayout.xml b/.idea/.idea.Erable/.idea/indexLayout.xml deleted file mode 100644 index 27ba142..0000000 --- a/.idea/.idea.Erable/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/.idea.Erable/.idea/vcs.xml b/.idea/.idea.Erable/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/.idea.Erable/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Erable.sln b/Erable.sln deleted file mode 100644 index 23f3366..0000000 --- a/Erable.sln +++ /dev/null @@ -1,48 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erable", "Erable\Erable.csproj", "{2A160FE3-0D4C-4834-A5CF-FE87930E31B2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sirop.Backend", "Sirop.Backend\Sirop.Backend.csproj", "{92930D7F-5FCF-4845-9CF9-E918D67469B1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Debug|x64.ActiveCfg = Debug|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Debug|x64.Build.0 = Debug|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Debug|x86.ActiveCfg = Debug|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Debug|x86.Build.0 = Debug|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Release|Any CPU.Build.0 = Release|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Release|x64.ActiveCfg = Release|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Release|x64.Build.0 = Release|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Release|x86.ActiveCfg = Release|Any CPU - {2A160FE3-0D4C-4834-A5CF-FE87930E31B2}.Release|x86.Build.0 = Release|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Debug|x64.ActiveCfg = Debug|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Debug|x64.Build.0 = Debug|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Debug|x86.ActiveCfg = Debug|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Debug|x86.Build.0 = Debug|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Release|Any CPU.Build.0 = Release|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Release|x64.ActiveCfg = Release|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Release|x64.Build.0 = Release|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Release|x86.ActiveCfg = Release|Any CPU - {92930D7F-5FCF-4845-9CF9-E918D67469B1}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/Erable/App.axaml b/Erable/App.axaml deleted file mode 100644 index 992dbfb..0000000 --- a/Erable/App.axaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/Erable/App.axaml.cs b/Erable/App.axaml.cs deleted file mode 100644 index 9528c60..0000000 --- a/Erable/App.axaml.cs +++ /dev/null @@ -1,49 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using Avalonia; -using Avalonia.Controls.ApplicationLifetimes; -using Avalonia.Markup.Xaml; -using Erable.ViewModels; -using Erable.Views; - -namespace Erable -{ - public class App : Application - { - public override void Initialize() - { - DiscordRpc.Initialize(); - AvaloniaXamlLoader.Load(this); - } - - public override void OnFrameworkInitializationCompleted() - { - if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) - { - desktop.MainWindow = new MainWindow - { - DataContext = new MainWindowViewModel(), - }; - } - - base.OnFrameworkInitializationCompleted(); - } - } -} \ No newline at end of file diff --git a/Erable/Assets/avalonia-logo.ico b/Erable/Assets/avalonia-logo.ico deleted file mode 100644 index da8d49f..0000000 Binary files a/Erable/Assets/avalonia-logo.ico and /dev/null differ diff --git a/Erable/Assets/erable.png b/Erable/Assets/erable.png deleted file mode 100644 index 1d25b8a..0000000 Binary files a/Erable/Assets/erable.png and /dev/null differ diff --git a/Erable/DiscordRPC.cs b/Erable/DiscordRPC.cs deleted file mode 100644 index e0be617..0000000 --- a/Erable/DiscordRPC.cs +++ /dev/null @@ -1,76 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ - -using System; -using DiscordRPC; -using DiscordRPC.Logging; - -namespace Erable -{ - public class DiscordRpc - { - -//Called when your application first starts. -//For example, just before your main loop, on OnEnable for unity. - public static void Initialize() - { - /* - Create a Discord client - NOTE: If you are using Unity3D, you must use the full constructor and define - the pipe connection. - */ - var client = new DiscordRpcClient("808844258038644747") - { - Logger = new ConsoleLogger() {Level = LogLevel.Warning} - }; - - //Set the logger - - //Subscribe to events - client.OnReady += (sender, e) => - { - Console.WriteLine("Connected to Discord..."); - Console.WriteLine("Received Ready from user {0}", e.User.Username); - }; - #if DEBUG - client.OnPresenceUpdate += (sender, e) => - { - Console.WriteLine("Received Update! {0}", e.Presence); - }; - #endif - - //Connect to the RPC - client.Initialize(); - - //Set the rich presence - //Call this as many times as you want and anywhere in your code. - client.SetPresence(new RichPresence() - { - Details = "Playing Nothing", - State = "RPC is being implemented!", - Assets = new Assets() - { - LargeImageKey = "erable_logo", - LargeImageText = "Erable Audio Player" - } - }); - } - } -} \ No newline at end of file diff --git a/Erable/Erable.csproj b/Erable/Erable.csproj deleted file mode 100644 index 88b6034..0000000 --- a/Erable/Erable.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - WinExe - net5.0 - enable - true - link - Erable - Alee Productions - 0.0.1 - false - - - x64 - - - osx-x64 - Erable - Erable - xyz.aleeproductions - 0.0.1 - 0.0.1 - AAPL - ???? - Erable - - NSApplication - true - true - - - - - - - - - - - - - - - - - - - About.axaml - Code - - - diff --git a/Erable/Program.cs b/Erable/Program.cs deleted file mode 100644 index 827f1bf..0000000 --- a/Erable/Program.cs +++ /dev/null @@ -1,65 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using Avalonia; -using Avalonia.ReactiveUI; - -namespace Erable -{ - class Program - { - // Initialization code. Don't use any Avalonia, third-party APIs or any - // SynchronizationContext-reliant code before AppMain is called: things aren't initialized - // yet and stuff might break. - public static void Main(string[] args) - { - Console.WriteLine("Erable {0}: Audio Player by Alee Productions", Sirop.Backend.Version.ErableVersion); - Console.WriteLine("Powered by Sirop Backend {0} ", Sirop.Backend.Version.SiropVersion); - - AppDomain.CurrentDomain.UnhandledException += ErrorHandler; - - #if DEBUG - Console.WriteLine("Running on .NET " + Environment.Version + ", and " + Environment.OSVersion); - Console.WriteLine("Opening window..."); - #endif - - BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); - - } - - static void ErrorHandler(object sender, UnhandledExceptionEventArgs e) - { - Console.WriteLine("Oh no! An error has occurred!"); - Console.WriteLine("Erable Version: " + Sirop.Backend.Version.ErableVersion); - Console.WriteLine("Sirop Version: " + Sirop.Backend.Version.SiropVersion); - Console.WriteLine("OS Version: " + Environment.OSVersion); - Console.WriteLine(".NET Version: " + Environment.Version); - Console.WriteLine("Report this to the developers..."); - Console.WriteLine("Did this crashed? " + e.IsTerminating); - } - - // Avalonia configuration, don't remove; also used by visual designer. - static AppBuilder BuildAvaloniaApp() - => AppBuilder.Configure() - .UsePlatformDetect() - .LogToTrace() - .UseReactiveUI(); - } -} diff --git a/Erable/ViewLocator.cs b/Erable/ViewLocator.cs deleted file mode 100644 index c857616..0000000 --- a/Erable/ViewLocator.cs +++ /dev/null @@ -1,51 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using Avalonia.Controls; -using Avalonia.Controls.Templates; -using Erable.ViewModels; - -namespace Erable -{ - public class ViewLocator : IDataTemplate - { - public bool SupportsRecycling => false; - - public IControl Build(object data) - { - var name = data.GetType().FullName!.Replace("ViewModel", "View"); - var type = Type.GetType(name); - - if (type != null) - { - return (Control)Activator.CreateInstance(type)!; - } - else - { - return new TextBlock { Text = "Not Found: " + name }; - } - } - - public bool Match(object data) - { - return data is ViewModelBase; - } - } -} \ No newline at end of file diff --git a/Erable/ViewModels/MainWindowViewModel.cs b/Erable/ViewModels/MainWindowViewModel.cs deleted file mode 100644 index b686425..0000000 --- a/Erable/ViewModels/MainWindowViewModel.cs +++ /dev/null @@ -1,82 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using System.Threading; -using Avalonia.Controls; -using Erable.Views; -using Sirop.Backend; - -namespace Erable.ViewModels -{ - public class MainWindowViewModel : ViewModelBase - { - - public void PlayFunction() - { - try - { - Thread t = new(Playback.PlayAudio); - t.Start(); - } - catch(Exception ex) - { - MessageBox.Show(new MainWindow(), ex.ToString(), "Error", MessageBox.MessageBoxButtons.Ok); - } - } - - public void StopFunction() - { - - } - - public void BrowseFunction() - { - var dialog = new OpenFileDialog(); - // dialog.Title - dialog.Filters.Add(new FileDialogFilter() {Name = "Audio Files", Extensions = {"mp3", "wav", "flac"}}); - dialog.Title = "Select Audio FIle"; - /* - var files = await dialog.ShowAsync(this); - - if(files != null && files.Length > 0) - { - var file = files[0]; - if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows)) - { - PlayFunction($"file:/{file.Replace('\\', '/')}"); - } - else - { - PlayFunction($"file://{file}"); - } - }*/ - } - - public void MsgBoxTest() - { - MessageBox.Show(new MainWindow(), "Hello world", "Test Title", MessageBox.MessageBoxButtons.Ok); - } - - public void ExceptionButton() - { - throw new Exception(); - } - } -} diff --git a/Erable/ViewModels/ViewModelBase.cs b/Erable/ViewModels/ViewModelBase.cs deleted file mode 100644 index 017fde3..0000000 --- a/Erable/ViewModels/ViewModelBase.cs +++ /dev/null @@ -1,30 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using System.Collections.Generic; -using System.Text; -using ReactiveUI; - -namespace Erable.ViewModels -{ - public class ViewModelBase : ReactiveObject - { - } -} diff --git a/Erable/Views/About.axaml b/Erable/Views/About.axaml deleted file mode 100644 index 7d6017f..0000000 --- a/Erable/Views/About.axaml +++ /dev/null @@ -1,17 +0,0 @@ - - - About Erable 0.1 Pre-Alpha - © Copyright 2021, Alee Productions - Licensed with GPL-3.0 - Report Bugs at https://git.io/JtrAO - - diff --git a/Erable/Views/About.axaml.cs b/Erable/Views/About.axaml.cs deleted file mode 100644 index 7c87162..0000000 --- a/Erable/Views/About.axaml.cs +++ /dev/null @@ -1,49 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using Avalonia; -using Avalonia.Controls; -using Avalonia.Input; -using Avalonia.Markup.Xaml; - -namespace Erable.Views -{ - public class About : Window - { - - public About() - { - InitializeComponent(); -#if DEBUG - this.AttachDevTools(); -#endif - } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - - private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e) - { - Environment.Exit(0); - } - } -} \ No newline at end of file diff --git a/Erable/Views/MainWindow.axaml b/Erable/Views/MainWindow.axaml deleted file mode 100644 index ca78244..0000000 --- a/Erable/Views/MainWindow.axaml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Erable/Views/MainWindow.axaml.cs b/Erable/Views/MainWindow.axaml.cs deleted file mode 100644 index e32cd42..0000000 --- a/Erable/Views/MainWindow.axaml.cs +++ /dev/null @@ -1,55 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using Avalonia; -using Avalonia.Controls; -using Avalonia.Input; -using Avalonia.Markup.Xaml; - -namespace Erable.Views -{ - public class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); -#if DEBUG - this.AttachDevTools(); -#endif - } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - - private void Exit_OnPointerPressed(object? sender, PointerPressedEventArgs e) - { - Environment.Exit(0); - } - - private void About_OnPointerPressed(object? sender, PointerPressedEventArgs e) - { - About about = new(); - about.ShowDialog(this); - - } - } -} \ No newline at end of file diff --git a/Erable/Views/MessageBox.axaml b/Erable/Views/MessageBox.axaml deleted file mode 100644 index 459817a..0000000 --- a/Erable/Views/MessageBox.axaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Erable/Views/MessageBox.axaml.cs b/Erable/Views/MessageBox.axaml.cs deleted file mode 100644 index af0ed38..0000000 --- a/Erable/Views/MessageBox.axaml.cs +++ /dev/null @@ -1,93 +0,0 @@ -/********************************************************************** - * - * Erable: Audio Player - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System.Threading.Tasks; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; - -namespace Erable.Views -{ - public class MessageBox : Window - { - public enum MessageBoxButtons - { - Ok, - OkCancel, - YesNo, - YesNoCancel - } - - public enum MessageBoxResult - { - Ok, - Cancel, - Yes, - No - } - - - public MessageBox() - { - AvaloniaXamlLoader.Load(this); - } - - public static Task Show(Window parent, string text, string title, MessageBoxButtons buttons) - { - var msgbox = new MessageBox() - { - Title = title - }; - msgbox.FindControl("Text").Text = text; - var buttonPanel = msgbox.FindControl("Buttons"); - - var res = MessageBoxResult.Ok; - - void AddButton(string caption, MessageBoxResult r, bool def = false) - { - var btn = new Button {Content = caption}; - btn.Click += (_, __) => { - res = r; - msgbox.Close(); - }; - buttonPanel.Children.Add(btn); - if (def) - res = r; - } - - if (buttons == MessageBoxButtons.Ok || buttons == MessageBoxButtons.OkCancel) - AddButton("OK", MessageBoxResult.Ok, true); - if (buttons == MessageBoxButtons.YesNo || buttons == MessageBoxButtons.YesNoCancel) - { - AddButton("Yes", MessageBoxResult.Yes); - AddButton("No", MessageBoxResult.No, true); - } - - if (buttons == MessageBoxButtons.OkCancel || buttons == MessageBoxButtons.YesNoCancel) - AddButton("Cancel", MessageBoxResult.Cancel, true); - - - var tcs = new TaskCompletionSource(); - msgbox.Closed += delegate { tcs.TrySetResult(res); }; - if (parent != null) - msgbox.ShowDialog(parent); - else msgbox.Show(); - return tcs.Task; - } - } -} \ No newline at end of file diff --git a/Sirop.Backend/Playback.cs b/Sirop.Backend/Playback.cs deleted file mode 100644 index bec3d21..0000000 --- a/Sirop.Backend/Playback.cs +++ /dev/null @@ -1,50 +0,0 @@ -/********************************************************************** - * - * Sirop Backend: Erable Audio Player's Backend - * Copyright (C) 2021 Alee Productions - * - * This program 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. - * - * This program 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 this program. If not, see . - * - ************************************************************************/ -using System; -using Gst; - -namespace Sirop.Backend -{ - public static class Playback - { - public static void PlayAudio() - { - Application.Init(); - // Build the pipeline - var pipeline = Parse.Launch("playbin uri=file:///home/andrew/Music/4616-werq-by-kevin-macleod.mp3"); - // Start playing - pipeline.SetState(State.Playing); - - // Wait until error or EOS - var bus = pipeline.Bus; - var msg = bus.TimedPopFiltered(Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error); - - // Free resources - pipeline.SetState(State.Null); - - - } - - public static void StopAudio() - { - - } - } -} \ No newline at end of file diff --git a/Sirop.Backend/Sirop.Backend.csproj b/Sirop.Backend/Sirop.Backend.csproj deleted file mode 100644 index 130264f..0000000 --- a/Sirop.Backend/Sirop.Backend.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net5.0 - 0.0.1 - Alee Productions - - - - - - - - diff --git a/Sirop.Backend/Version.cs b/Sirop.Backend/Version.cs deleted file mode 100644 index df30c15..0000000 --- a/Sirop.Backend/Version.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Sirop.Backend -{ - public class Version - { - public static string ErableVersion = "0.1"; - public static string SiropVersion = "0.1"; - } -} \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 13ce3a5..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: 1.0.{build} -image: Visual Studio 2019 -before_build: -- ps: dotnet restore -build: - verbosity: normal -before_deploy: -- ps: 7z a Erable-Windows.zip Erable\bin\Debug\net5.0 -- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/deploy.ps1')) diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..7d40ee6 --- /dev/null +++ b/project.godot @@ -0,0 +1,18 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +[application] + +config/name="Erable" +config/description="Audio Player" + +[rendering] + +quality/driver/driver_name="GLES2" -- cgit v1.2.3