School Commit Init
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
<?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.User.SearchSongsButton">
|
||||
<VerticalStackLayout>
|
||||
<Button
|
||||
x:Name="Search"
|
||||
Text="Search"
|
||||
Clicked="OnSearchClick"
|
||||
HorizontalOptions="Start"
|
||||
Margin="15,0,0,0"
|
||||
/>
|
||||
<!--xaml e retardat ca se ia left,top,right,bottom la margin si restu in loc sa inceapa de la top ca in css-->
|
||||
</VerticalStackLayout>
|
||||
</ContentView>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TechTitans.Views.Components.User
|
||||
{
|
||||
public partial class SearchSongsButton : ContentView
|
||||
{
|
||||
public SearchSongsButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnSearchClick(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushAsync(new SearchPage());
|
||||
}
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage 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.User.UserSongDashboard"
|
||||
Title="Song Dashboard">
|
||||
<VerticalStackLayout>
|
||||
<VerticalStackLayout Padding="20" Spacing="10">
|
||||
<Image
|
||||
x:Name="SongImage"
|
||||
HorizontalOptions="Start"
|
||||
HeightRequest="256"
|
||||
WidthRequest="256"
|
||||
/>
|
||||
<Label
|
||||
x:Name="SongTitle"
|
||||
Text=""
|
||||
FontSize="32"
|
||||
FontAttributes="Bold"
|
||||
WidthRequest="256"
|
||||
HorizontalOptions="Start"
|
||||
/>
|
||||
<Label
|
||||
x:Name="SongArtist"
|
||||
Text=""
|
||||
FontSize="20"
|
||||
TextColor="#6E6E6E"
|
||||
Margin="0,-10,0,0"
|
||||
HorizontalOptions="Start"
|
||||
/>
|
||||
<Label
|
||||
x:Name="SongAlbum"
|
||||
Text=""
|
||||
FontSize="24"
|
||||
HorizontalOptions="Start"
|
||||
/>
|
||||
</VerticalStackLayout>
|
||||
<!--linie f ghetto-->
|
||||
<BoxView Color="Gray" HeightRequest="2" HorizontalOptions="FillAndExpand" Margin="10, 5" />
|
||||
<HorizontalStackLayout HorizontalOptions="CenterAndExpand" Spacing="10">
|
||||
<VerticalStackLayout>
|
||||
<Button
|
||||
Text="Info"
|
||||
Style="{StaticResource TabNavButton}"
|
||||
TextColor="#6E6E6E"
|
||||
FontAttributes="Bold"
|
||||
Clicked="OnInfoClick"
|
||||
/>
|
||||
<BoxView x:Name="InfoBoxView" Color="#6E6E6E" HeightRequest="2" HorizontalOptions="FillAndExpand"/>
|
||||
</VerticalStackLayout>
|
||||
|
||||
</HorizontalStackLayout>
|
||||
<Frame
|
||||
CornerRadius="10"
|
||||
Margin="20,20,20,0"
|
||||
Padding="10"
|
||||
BackgroundColor="#6E6E6E"
|
||||
>
|
||||
<HorizontalStackLayout Spacing="40" HorizontalOptions="Center">
|
||||
<VerticalStackLayout Spacing="20" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
|
||||
<Label
|
||||
x:Name="label1"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
<Label
|
||||
x:Name="label2"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
<Label
|
||||
x:Name="label3"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
<Label
|
||||
x:Name="label4"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
</VerticalStackLayout>
|
||||
<VerticalStackLayout Spacing="20" VerticalOptions="FillAndExpand" HorizontalOptions="EndAndExpand">
|
||||
<Label
|
||||
x:Name="content1"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
<Label
|
||||
x:Name="content2"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
<Label
|
||||
x:Name="content3"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
<Label
|
||||
x:Name="content4"
|
||||
Text=""
|
||||
FontSize="16"
|
||||
/>
|
||||
</VerticalStackLayout>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
</Frame>
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
using TechTitans.Models;
|
||||
using TechTitans.ViewModels;
|
||||
namespace TechTitans.Views.Components.User
|
||||
{
|
||||
public partial class UserSongDashboard : ContentPage
|
||||
{
|
||||
// alt domain song type cu mai multe detalii
|
||||
int songId;
|
||||
ArtistSongDashboardViewModel viewModel;
|
||||
public UserSongDashboard(SongBasicInfo song)
|
||||
{
|
||||
// song = service.GetSongById(songId);
|
||||
songId = song.SongId;
|
||||
InitializeComponent();
|
||||
populateViewModel();
|
||||
LoadPage();
|
||||
}
|
||||
|
||||
private void populateViewModel()
|
||||
{
|
||||
// viewModel = getArtistSongDashboardModel(int sondId)
|
||||
viewModel = getMockedViewModel();
|
||||
|
||||
}
|
||||
|
||||
private void LoadPage()
|
||||
{
|
||||
SongImage.Source = viewModel.SongInfo.Image;
|
||||
SongTitle.Text = viewModel.SongInfo.Name;
|
||||
SongArtist.Text = "by " + viewModel.ArtistInfo.Name;
|
||||
SongAlbum.Text = "from " + viewModel.SongInfo.Album;
|
||||
|
||||
// set song info panel
|
||||
label1.Text = "Genre:";
|
||||
content1.Text = viewModel.SongInfo.Genre;
|
||||
label2.Text = "Subgenre:";
|
||||
content2.Text = viewModel.SongInfo.Subgenre;
|
||||
label3.Text = "Country:";
|
||||
content3.Text = viewModel.SongInfo.Country;
|
||||
label4.Text = "Language:";
|
||||
content4.Text = viewModel.SongInfo.Language;
|
||||
}
|
||||
|
||||
private SongBasicInfo getMockedSong()
|
||||
{
|
||||
return new SongBasicInfo();
|
||||
}
|
||||
|
||||
private ArtistSongDashboardViewModel getMockedViewModel()
|
||||
{
|
||||
var mockedModel = new ArtistSongDashboardViewModel()
|
||||
{
|
||||
SongInfo = new SongBasicInfo(),
|
||||
SongDetails = new SongRecommendationDetails(),
|
||||
ArtistInfo = new AuthorDetails(),
|
||||
};
|
||||
return mockedModel;
|
||||
}
|
||||
private void OnInfoClick(object sender, EventArgs e)
|
||||
{
|
||||
InfoBoxView.Color = Color.FromArgb("#6E6E6E");
|
||||
label1.Text = "Genre:";
|
||||
content1.Text = viewModel.SongInfo.Genre;
|
||||
label2.Text = "Subgenre:";
|
||||
content2.Text = viewModel.SongInfo.Subgenre;
|
||||
label3.Text = "Country:";
|
||||
content3.Text = viewModel.SongInfo.Country;
|
||||
label4.Text = "Language:";
|
||||
content4.Text = viewModel.SongInfo.Language;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user