School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TechTitans.Views.Components.EndOfYearRecap.FirstScreen">
<StackLayout x:Name="Background" BackgroundColor="#0A14C8" VerticalOptions="FillAndExpand">
<Label
Text="Sounds like you had quite the 2023. Let's play it back..."
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White"/>
<StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
<Image
Source= "first_screen_1.jpg"
HeightRequest="256"
WidthRequest="256"
Aspect="Fill"
x:Name="GenericImage"
/>
</StackLayout>
</StackLayout>
</ContentView>
@@ -0,0 +1,44 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class FirstScreen : ContentView
{
public FirstScreen()
{
InitializeComponent();
ChangeImageAndBackgraound();
}
private async void ChangeImageAndBackgraound()
{
await Task.Delay(3000);
var imagesource = new FileImageSource
{
File = "first_screen_2.jpg"
};
GenericImage.Source = imagesource;
Background.BackgroundColor = new Color(200, 20, 200);
await Task.Delay(3000);
imagesource = new FileImageSource
{
File = "first_screen_3.jpg"
};
GenericImage.Source = imagesource;
Background.BackgroundColor = new Color(100, 200, 100);
await Task.Delay(3000);
imagesource = new FileImageSource
{
File = "first_screen_4.jpg"
};
GenericImage.Source = imagesource;
Background.BackgroundColor = new Color(200, 200, 20);
await Task.Delay(3000);
imagesource = new FileImageSource
{
File = "first_screen_1.jpg"
};
GenericImage.Source = imagesource;
Background.BackgroundColor = new Color(10, 20, 200);
ChangeImageAndBackgraound();
}
}
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TechTitans.Views.Components.EndOfYearRecap.ListenerPersonalityScreen"
xmlns:local="clr-namespace:TechTitans.ViewModels">
<ContentView.BindingContext>
<local:EndOfYearRecapViewModel/>
</ContentView.BindingContext>
<StackLayout x:Name="MainContent">
<Label
x:Name="MainLabel"
VerticalOptions="Center"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White" >
</Label>
</StackLayout>
</ContentView>
@@ -0,0 +1,33 @@
using TechTitans.Enums;
using TechTitans.ViewModels;
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class ListenerPersonalityScreen : ContentView
{
public EndOfYearRecapViewModel ViewModel { get; set; }
public ListenerPersonalityScreen(EndOfYearRecapViewModel _viewModel)
{
InitializeComponent();
ViewModel = _viewModel;
switch (ViewModel.ListenerPersonality)
{
case ListenerPersonality.Vanilla:
MainContent.BackgroundColor = new Color(200, 200, 100);
MainLabel.Text = "You've been categorized as Vanilla, indicating that you've listened to very few songs. That's absolutely fine! Everyone has their own preferences when it comes to music, and there's beauty in simplicity. Whether you choose to explore more or stick to your familiar tunes, the most important thing is that music brings you joy in its own special way.";
break;
case ListenerPersonality.Casual:
MainContent.BackgroundColor = new Color(100, 200, 100);
MainLabel.Text = "You're a Casual listener, someone who enjoys music without delving too deep into it. While you may not have listened to a vast number of songs, your appreciation for the tunes you've encountered is undeniable. Keep enjoying music at your own pace, letting it add flavor to your moments without overwhelming them.";
break;
case ListenerPersonality.Melophile:
MainContent.BackgroundColor = new Color(100, 100, 100);
MainLabel.Text = "Congratulations! You've been classified as a Melophile, someone who has listened to a lot of songs. Your passion for music knows no bounds, and your love for exploring different melodies is truly commendable. Keep listening, keep discovering, and let the rhythm of life guide you.";
break;
case ListenerPersonality.Explorer:
MainContent.BackgroundColor = new Color(50, 0, 100);
MainLabel.Text = "Kudos to you! You're an Explorer in the realm of music, always eager to delve into new genres and sounds. Your adventurous spirit leads you to uncharted musical territories, expanding your horizons with each tune you encounter. Embrace the journey of discovery and let the melodies carry you to places you've never been.";
break;
}
}
}
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="TechTitans.Views.Components.EndOfYearRecap.MinutesListenedScreen">
<StackLayout BackgroundColor="Black">
<Label
Text="{Binding MinutesListened, StringFormat='You\'ve listened to {0} minutes of music this year...'}"
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White"/>
<AbsoluteLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
<Image x:Name="RedHalfCircle"
Source="half_circle.svg"
HeightRequest="256"
Aspect="AspectFit">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Red" />
</Image.Behaviors>
</Image>
<Image x:Name="BlueHalfCircle"
Source="half_circle.svg"
HeightRequest="256"
Scale="0"
Aspect="AspectFit">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Blue" />
</Image.Behaviors>
</Image>
</AbsoluteLayout>
</StackLayout>
</ContentView>
@@ -0,0 +1,19 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class MinutesListenedScreen : ContentView
{
public MinutesListenedScreen()
{
InitializeComponent();
CrazyFuckingAnimation();
}
public async void CrazyFuckingAnimation()
{
await RedHalfCircle.ScaleTo(0, 1000, Easing.CubicIn);
await BlueHalfCircle.ScaleTo(1, 1000, Easing.CubicIn);
await BlueHalfCircle.ScaleTo(0, 1000, Easing.CubicIn);
await RedHalfCircle.ScaleTo(1, 1000, Easing.CubicIn);
CrazyFuckingAnimation();
}
}
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:custom="clr-namespace:TechTitans.Views.Components"
x:Class="TechTitans.Views.Components.EndOfYearRecap.MostListenedGenresScreen">
<VerticalStackLayout>
<Label Text="Overall your music this year was..."
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White" >
</Label>
<CollectionView ItemsSource="{Binding Top5Genres}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Border Stroke="#C49B33"
StrokeThickness="4"
Background="#2B0B98"
Padding="16,8"
HorizontalOptions="Center"
Margin="10">
<Border.StrokeShape>
<RoundRectangle CornerRadius="40,0,0,40" />
</Border.StrokeShape>
<Label Text="{Binding .}"
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="30"
TextColor="White"
BackgroundColor="#2B0B98"
WidthRequest="350"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
Padding="0, 20, 0, 20"/>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ContentView>
@@ -0,0 +1,9 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class MostListenedGenresScreen : ContentView
{
public MostListenedGenresScreen()
{
InitializeComponent();
}
}
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TechTitans.Views.Components.EndOfYearRecap.MostPlayedArtistScreen"
xmlns:custom="clr-namespace:TechTitans.Views.Components"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
<StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
<Image x:Name="RedHalfCircle1"
Source="half_circle.svg"
HeightRequest="128"
Aspect="AspectFit">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Red" />
</Image.Behaviors>
</Image>
<Label VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White" >
<Label.Text>
<MultiBinding StringFormat="{}Your top artist this year was {0}">
<Binding Path="MostPlayedArtistPercentile.Item1" />
</MultiBinding>
</Label.Text>
</Label>
<custom:Piechart Progress="{Binding MostPlayedArtistPercentile.Item2}"
ProgressColor="Red"
ProgressLeftColor="LightGreen"
Size="140"
TextColor="DarkGreen"
Thickness="4"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label VerticalOptions="End"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White" >
<Label.Text>
<MultiBinding StringFormat="{}Out of all your songs, {0:F2} were by {1}">
<Binding Path="MostPlayedArtistPercentile.Item2" />
<Binding Path="MostPlayedArtistPercentile.Item1" />
</MultiBinding>
</Label.Text>
</Label>
<Image x:Name="RedHalfCircle2"
Source="half_circle.svg"
HeightRequest="128"
Aspect="AspectFit">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Red" />
</Image.Behaviors>
</Image>
</StackLayout>
</ContentView>
@@ -0,0 +1,18 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class MostPlayedArtistScreen : ContentView
{
public MostPlayedArtistScreen()
{
InitializeComponent();
AnotherCrazyAnimation();
}
public async void AnotherCrazyAnimation()
{
var t1 = RedHalfCircle1.RotateTo(36000, 200000, Easing.Linear);
var t2 = RedHalfCircle2.RotateTo(-36000, 200000, Easing.Linear);
await Task.WhenAll(t1, t2);
AnotherCrazyAnimation();
}
}
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TechTitans.Views.Components.EndOfYearRecap.MostPlayedSongScreen"
xmlns:custom="clr-namespace:TechTitans.Views.Components">
<VerticalStackLayout>
<Label VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White" >
<Label.Text>
<MultiBinding StringFormat="{}{0} by {1} was your top track this year">
<Binding Path="MostPlayedSongPercentile.Item1.Name" />
<Binding Path="MostPlayedSongPercentile.Item1.Artist" />
</MultiBinding>
</Label.Text>
</Label>
<Image
Source="{Binding MostPlayedSongPercentile.Item1.Image}"
HeightRequest="256"
Aspect="AspectFit"
Margin="0,40,0,40"
/>
<Label Text="{Binding MostPlayedSongPercentile.Item2, StringFormat='You played it a whopping {0:F2}% of the time'}"
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<custom:Piechart Progress="{Binding MostPlayedSongPercentile.Item2}"
ProgressColor="Red"
ProgressLeftColor="LightGreen"
Size="140"
TextColor="DarkGreen"
Thickness="4"
HorizontalOptions="Center"/>
</VerticalStackLayout>
</ContentView>
@@ -0,0 +1,9 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class MostPlayedSongScreen : ContentView
{
public MostPlayedSongScreen()
{
InitializeComponent();
}
}
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TechTitans.Views.Components.EndOfYearRecap.NewGenresScreen">
<VerticalStackLayout>
<Label Text="This year you discovered a new taste in music..."
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White" >
</Label>
<CollectionView ItemsSource="{Binding NewGenresDiscovered}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Border Stroke="#C49B33"
StrokeThickness="4"
Background="#2B0B98"
Padding="16,8"
HorizontalOptions="Center"
Margin="10">
<Border.StrokeShape>
<RoundRectangle CornerRadius="40,0,0,40" />
</Border.StrokeShape>
<Label Text="{Binding .}"
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="30"
TextColor="White"
BackgroundColor="#2B0B98"
WidthRequest="350"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
Padding="0, 20, 0, 20"/>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ContentView>
@@ -0,0 +1,9 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class NewGenresScreen : ContentView
{
public NewGenresScreen()
{
InitializeComponent();
}
}
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:custom="clr-namespace:TechTitans.Views.Components"
x:Class="TechTitans.Views.Components.EndOfYearRecap.Top5SongsScreen">
<StackLayout BackgroundColor="Black">
<Label
Text="These were your top five trancks of 2023"
VerticalOptions="Start"
HorizontalOptions="Center"
FontSize="25"
Padding="20,40,20,20"
TextColor="White"/>
<CollectionView ItemsSource="{Binding Top5MostListenedSongs}">
<CollectionView.ItemTemplate>
<DataTemplate>
<custom:SongItem Padding="20,20,0,0" BindingContext="{Binding .}"/>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
</ContentView>
@@ -0,0 +1,9 @@
namespace TechTitans.Views.Components.EndOfYearRecap;
public partial class Top5SongsScreen : ContentView
{
public Top5SongsScreen()
{
InitializeComponent();
}
}