This commit is contained in:
БП 2025-04-10 15:34:02 +03:00
parent 161180e5a5
commit 41527a95b2
7 changed files with 111 additions and 35 deletions

View File

@ -6,7 +6,9 @@
{ {
InitializeComponent(); InitializeComponent();
MainPage = new AppShell();
}
MainPage = new MainPage();
}
} }
} }

View File

@ -1,11 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyDiplom.BuyPage"> xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
<VerticalStackLayout> x:Class="MyDiplom.BuyPage"
<Label Color="Transparent">
Text="Welcome to .NET MAUI!"
VerticalOptions="Center" <Border Stroke="Gray" >
HorizontalOptions="Center" /> <Border.StrokeShape>
</VerticalStackLayout> <RoundRectangle CornerRadius="25"/>
</ContentView> </Border.StrokeShape>
<VerticalStackLayout Padding="20" BackgroundColor="White" Spacing="15">
<Label Text="ПОПОЛНЕНИЕ СЧЕТА"
FontSize="20"
FontAttributes="Bold"
HorizontalOptions="Center"
TextColor="Black" />
<HorizontalStackLayout Spacing="10"
BackgroundColor="White"
Padding="10,5,0,0"
HeightRequest="50"
VerticalOptions="Center"
HorizontalOptions="Fill">
<Entry WidthRequest="300"/>
<Label Text="₽"
FontSize="18"
VerticalOptions="Center" />
<Button Text="ПОПОЛНИТЬ"
BackgroundColor="Black"
TextColor="White"
FontAttributes="Bold"
CornerRadius="10"
Padding="10"
HorizontalOptions="End"
WidthRequest="120"
Clicked="BuyButtonCliked"/>
</HorizontalStackLayout>
<Label Text="После нажатия кнопки ОПЛАТИТЬ вы будете перенаправлены на платежную систему"
FontSize="12"
TextColor="Gray"
HorizontalOptions="Start"
Margin="0,10,0,0" />
<Button Text="Закрыть" Clicked="CloseButtonClicked"/>
</VerticalStackLayout>
</Border>
</toolkit:Popup>

View File

@ -1,9 +1,20 @@
using CommunityToolkit.Maui.Views;
namespace MyDiplom; namespace MyDiplom;
public partial class BuyPage : ContentView public partial class BuyPage : Popup
{ {
public BuyPage() public BuyPage()
{ {
InitializeComponent(); InitializeComponent();
} }
}
private void CloseButtonClicked(object sender, EventArgs e)
{
Close();
}
private void BuyButtonCliked(object sender, EventArgs e)
{
}
}

View File

@ -34,7 +34,8 @@
TextColor="Black" TextColor="Black"
HorizontalOptions="EndAndExpand" HorizontalOptions="EndAndExpand"
WidthRequest="110" WidthRequest="110"
HeightRequest="20"/> HeightRequest="20"
Clicked="OnButtonClicked" />
<Label Text="{Binding User.DisplayName}" TextColor="White" /> <Label Text="{Binding User.DisplayName}" TextColor="White" />
@ -78,16 +79,12 @@
<RoundRectangle CornerRadius="25"/> <RoundRectangle CornerRadius="25"/>
</Border.StrokeShape> </Border.StrokeShape>
<StackLayout Background="#F3F3F3" <StackLayout Background="#6D87D3"
Spacing="2" > Spacing="2" Padding="0,10,0,0">
<Label Text="Боты" HorizontalOptions="Center" Scale="2"/> <Label Text="Боты" HorizontalOptions="Center" Scale="2"/>
<Button Text="1" TextColor="Black" Background="Transparent"/> <Button Text="TG FREELANCE ПОМОЩНИК" TextColor="Black" Background="Transparent"/>
<Button Text="1" TextColor="Black" Background="Transparent"/> <Button Text="Раскрутка TG Группы" TextColor="Black" Background="Transparent"/>
<Button Text="1" TextColor="Black" Background="Transparent"/> <Button Text="Интернет Магазин" TextColor="Black" Background="Transparent"/>
<Button Text="1" TextColor="Black" Background="Transparent"/>
<Button Text="1" TextColor="Black" Background="Transparent"/>
<Button Text="1" TextColor="Black" Background="Transparent"/>
<Button Text="1" TextColor="Black" Background="Transparent"/>
</StackLayout> </StackLayout>
</Border> </Border>
@ -119,7 +116,7 @@
<VerticalStackLayout Background="#F3F3F3" HeightRequest="235" > <VerticalStackLayout Background="#F3F3F3" HeightRequest="235" >
<StackLayout> <StackLayout>
<Label Text="Выберите фриланс биржу, с которой хотите работать:" FontSize="45" Padding="1" /> <Label Text="Выберите фриланс биржу, с которой хотите работать:" FontSize="35" Padding="1" />
</StackLayout> </StackLayout>
<StackLayout VerticalOptions="Center" > <StackLayout VerticalOptions="Center" >
<StackLayout Padding="10,0,0,0" Orientation="Horizontal" Spacing="10" > <StackLayout Padding="10,0,0,0" Orientation="Horizontal" Spacing="10" >
@ -143,9 +140,16 @@
<Label Text="Kwork" VerticalOptions= "Center"/> <Label Text="Kwork" VerticalOptions= "Center"/>
<CheckBox Margin="0,0,-25,0"/> <CheckBox Margin="0,0,-25,0"/>
<Label Text="FL" VerticalOptions= "Center" /> <Label Text="FL" VerticalOptions= "Center" />
</StackLayout> </StackLayout>
<VerticalStackLayout Padding="10,0,15,0" Spacing="10" HorizontalOptions="Start">
<Button BackgroundColor="Black" WidthRequest="130" Text="Сохранить" CornerRadius="20"/>
</VerticalStackLayout>
</StackLayout> </StackLayout>
@ -173,7 +177,7 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<VerticalStackLayout Grid.ColumnSpan="2" Margin="10" > <VerticalStackLayout Grid.ColumnSpan="2" Margin="10" >
<Label Text="Выберите подходящую категорию:" FontSize="18" /> <Label Text="Выберите подходящую категорию:" FontSize="18" />
<StackLayout Orientation="Horizontal" Spacing="10" > <StackLayout Orientation="Horizontal" Spacing="10" >
<Button Text="Выделить всё" WidthRequest="130" TextColor="Black" Background="LightSlateGray" /> <Button Text="Выделить всё" WidthRequest="130" TextColor="Black" Background="LightSlateGray" />

View File

@ -1,4 +1,9 @@
using MyDiplom.ViewModels; using CommunityToolkit.Maui.Views;
using MyDiplom.ViewModels;
namespace MyDiplom namespace MyDiplom
{ {
@ -13,7 +18,10 @@ namespace MyDiplom
this.BindingContext = new UserViewModels(); this.BindingContext = new UserViewModels();
} }
private void OnButtonClicked(object sender, EventArgs e)
{
var buyPopup = new BuyPage();
this.ShowPopup(buyPopup);
}
} }
} }

View File

@ -1,4 +1,6 @@
using Microsoft.Extensions.Logging; using CommunityToolkit.Maui;
using Microsoft.Extensions.Logging;
namespace MyDiplom namespace MyDiplom
{ {
@ -9,7 +11,8 @@ namespace MyDiplom
var builder = MauiApp.CreateBuilder(); var builder = MauiApp.CreateBuilder();
builder builder
.UseMauiApp<App>() .UseMauiApp<App>()
.ConfigureFonts(fonts => .UseMauiCommunityToolkit()
.ConfigureFonts(fonts =>
{ {
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");

View File

@ -58,7 +58,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" /> <PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.71" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" /> <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup> </ItemGroup>