chore: license in code

This commit is contained in:
Matyáš Caras 2023-04-26 21:13:57 +02:00
parent dd878bfc65
commit b3d776abc7
6 changed files with 105 additions and 1 deletions

View File

@ -12,6 +12,23 @@ namespace Ocarina2.Converter;
public class AlbumArtConverter:IValueConverter public class AlbumArtConverter:IValueConverter
{ {
/*
OCARINA2 Open-source music player and library manager
Copyright (C) 2023 Matyáš Caras
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 <https://www.gnu.org/licenses/>.
*/
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{ {
if (value == null) return new MaterialIconExt(MaterialIconKind.Music); if (value == null) return new MaterialIconExt(MaterialIconKind.Music);

View File

@ -8,6 +8,23 @@ namespace Ocarina2.Converter;
public class SongMetadataConverter:IValueConverter public class SongMetadataConverter:IValueConverter
{ {
/*
OCARINA2 Open-source music player and library manager
Copyright (C) 2023 Matyáš Caras
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 <https://www.gnu.org/licenses/>.
*/
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{ {
if(!int.TryParse(parameter as string,out var p)) return new BindingNotification(new InvalidCastException(), BindingErrorType.Error); // get int param if(!int.TryParse(parameter as string,out var p)) return new BindingNotification(new InvalidCastException(), BindingErrorType.Error); // get int param

View File

@ -19,7 +19,24 @@ public class Language
public readonly string RPIconText; public readonly string RPIconText;
public Language(string code, string menuFile, string menuOpen, string menuExit, string music, string noMusic, string rpSong, string rpArtist, string rpIconText) public Language(string code, string menuFile, string menuOpen, string menuExit, string music, string noMusic, string rpSong, string rpArtist, string rpIconText)
{ {
/*
OCARINA2 Open-source music player and library manager
Copyright (C) 2023 Matyáš Caras
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 <https://www.gnu.org/licenses/>.
*/
Code = code; Code = code;
MenuFile = menuFile; MenuFile = menuFile;
MenuOpen = menuOpen; MenuOpen = menuOpen;

View File

@ -4,6 +4,23 @@ namespace Ocarina2.Models;
public class MusicFile public class MusicFile
{ {
/*
OCARINA2 Open-source music player and library manager
Copyright (C) 2023 Matyáš Caras
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 <https://www.gnu.org/licenses/>.
*/
public File Metadata { get; } public File Metadata { get; }
public string Path { get; } public string Path { get; }

View File

@ -13,6 +13,23 @@ namespace Ocarina2.ViewModels;
public class MainWindowViewModel : ViewModelBase public class MainWindowViewModel : ViewModelBase
{ {
/*
OCARINA2 Open-source music player and library manager
Copyright (C) 2023 Matyáš Caras
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 <https://www.gnu.org/licenses/>.
*/
private readonly Language _l = Language.Load("en_US"); private readonly Language _l = Language.Load("en_US");
private string _menuOpen; private string _menuOpen;
private string _menuFile; private string _menuFile;

View File

@ -12,6 +12,25 @@
x:Class="Ocarina2.Views.MainWindow" x:Class="Ocarina2.Views.MainWindow"
Icon="/Assets/icon.ico" Icon="/Assets/icon.ico"
Title="{Binding AppName}"> Title="{Binding AppName}">
<!--
OCARINA2 Open-source music player and library manager
Copyright (C) 2023 Matyáš Caras
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 <https://www.gnu.org/licenses/>.
-->
<Window.Resources> <Window.Resources>
<converter:SongMetadataConverter x:Key="SongMeta"/> <converter:SongMetadataConverter x:Key="SongMeta"/>
<converter:AlbumArtConverter x:Key="AlbumArt"/> <converter:AlbumArtConverter x:Key="AlbumArt"/>