Compare commits

..

No commits in common. "branch3" and "main" have entirely different histories.

8 changed files with 15 additions and 273 deletions

View File

@ -1,15 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="MobailApp.MainPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
HeightRequest="812"
MaximumHeightRequest="812"
MaximumWidthRequest="375"
WidthRequest="375">
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MobailApp.MainPage">
<ScrollView>
<!--<VerticalStackLayout
<VerticalStackLayout
Padding="30,0"
Spacing="25">
<Image
@ -35,149 +30,7 @@
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Fill" />
<Button
x:Name="NewPageOpenbtn"
Text="New page"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="NewPageOpenbtn_Clicked"
HorizontalOptions="Fill" />
</VerticalStackLayout>-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="746" />
<RowDefinition Height="19" />
</Grid.RowDefinitions>
<StackLayout Grid.Row="0">
<StackLayout Margin="20,75,20,0" HorizontalOptions="Center">
<Label
FontSize="32"
HorizontalOptions="Center"
Text="Привет!"
TextColor="#707B81" />
<Label
Margin="0,8,0,0"
FontSize="16"
HorizontalOptions="Center"
Text="Заполните Свои Данные Или"
TextColor="#707B81" />
<Label
FontSize="16"
HorizontalOptions="Center"
Text="Продолжите Через Социальные Медиа"
TextColor="#707B81" />
</StackLayout>
<StackLayout Margin="20,30,20,0">
<Grid HeightRequest="244" MinimumWidthRequest="335">
<Grid HeightRequest="196" WidthRequest="335">
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackLayout Grid.Row="0" MinimumWidthRequest="335">
<Label
HorizontalOptions="Start"
Text="Email"
TextColor="#707B81"
VerticalOptions="Start" />
<HorizontalStackLayout>
<Frame
Margin="0,12,0,0"
BackgroundColor="#f7f7f9"
BorderColor="#f7f7f9"
CornerRadius="15"
HeightRequest="48"
WidthRequest="335">
<Entry
x:Name="etyEmail"
HeightRequest="48"
IsReadOnly="False"
Text="xyz@gmail.com"
TextColor="#6A6A6A" />
</Frame>
</HorizontalStackLayout>
</StackLayout>
<StackLayout
Grid.Row="1"
Margin="0,26,0,0"
WidthRequest="335">
<Label
HorizontalOptions="Start"
Text="Пароль"
TextColor="#707B81"
VerticalOptions="Start" />
<HorizontalStackLayout>
<Frame
Margin="0,12,0,0"
BackgroundColor="#f7f7f9"
BorderColor="#f7f7f9"
CornerRadius="15"
HeightRequest="48"
WidthRequest="335">
<Grid HeightRequest="40">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="40" />
</Grid.ColumnDefinitions>
<Entry
x:Name="etyPass"
HeightRequest="48"
IsPassword="True"
IsReadOnly="False"
TextColor="#6A6A6A" />
<Button
x:Name="btnPassOpen"
Grid.Column="1"
BackgroundColor="#f7f7f9"
Clicked="btnPassOpen_Clicked"
FontSize="16"
HeightRequest="40"
Text="◉"
TextColor="Black"
WidthRequest="48" />
</Grid>
</Frame>
</HorizontalStackLayout>
</StackLayout>
</Grid>
<Button
BackgroundColor="White"
Margin="0,16,0,0"
FontSize="12"
HeightRequest="36"
HorizontalOptions="End"
Text="Восстановить"
TextColor="#707B81"
VerticalOptions="End"
WidthRequest="108" />
</Grid>
<Button
Margin="0,24,0,0"
BackgroundColor="#48B2E7"
Clicked="Button_Clicked"
CornerRadius="14"
Text="Войти"
TextColor="#F7F7F9" />
</StackLayout>
</StackLayout>
<StackLayout
Grid.Row="1"
HorizontalOptions="Center"
Orientation="Horizontal"
WidthRequest="335">
<Label
Margin="35,0,0,0"
FontSize="16"
HeightRequest="19"
Text="Вы впервые?"
TextColor="#6A6A6A" />
<Button
BackgroundColor="White"
FontSize="16"
HeightRequest="40"
Text="Создать Пользователя"
TextColor="#2B2B2B" />
</StackLayout>
</Grid>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

View File

@ -2,54 +2,24 @@
{
public partial class MainPage : ContentPage
{
//int count = 0;
bool Pass = false;
string Email = "";
int count = 0;
public MainPage()
{
InitializeComponent();
}
private async void Button_Clicked(object sender, EventArgs e)
private void OnCounterClicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new NewPage1());
}
count++;
private async void btnPassOpen_Clicked(object sender, EventArgs e)
{
if(Pass == false)
{
btnPassOpen.Text = "◎";
etyPass.IsPassword = false;
Pass = true;
}
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
{
btnPassOpen.Text = "◉";
etyPass.IsPassword = true;
Pass = false;
}
CounterBtn.Text = $"Clicked {count} times";
//await Navigation.PushAsync(new NewPage2());
SemanticScreenReader.Announce(CounterBtn.Text);
}
//private void OnCounterClicked(object sender, EventArgs e)
//{
// count++;
// if (count == 1)
// CounterBtn.Text = $"Clicked {count} time";
// else
// CounterBtn.Text = $"Clicked {count} times";
// SemanticScreenReader.Announce(CounterBtn.Text);
//}
//private async void NewPageOpenbtn_Clicked(System.Object sender, System.EventArgs e)
//{
// await Navigation.PushAsync(new NewPage1());
//}
}
}

View File

@ -62,13 +62,4 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="NewPage1.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="NewPage2.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

View File

@ -2,20 +2,10 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
<ActiveDebugFramework>net8.0-android</ActiveDebugFramework>
<ActiveDebugProfile>Pixel 2 Q 10.0 - API 29 (Android 10.0 — API 29)</ActiveDebugProfile>
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
<DefaultDevice>pixel_2_-_api_29</DefaultDevice>
<ActiveDebugFramework>net8.0-windows10.0.19041.0</ActiveDebugFramework>
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
</PropertyGroup>
<ItemGroup>
<MauiXaml Update="NewPage1.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="NewPage2.xaml">
<SubType>Designer</SubType>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<None Update="App.xaml">
<SubType>Designer</SubType>
</None>

View File

@ -1,20 +0,0 @@
<?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"
x:Class="MobailApp.NewPage1"
Title="NewPage1">
<VerticalStackLayout VerticalOptions="Center">
<Label
Margin="0,0,0,30"
Text="Новая страничка"
FontSize="30"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Button
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</ContentPage>

View File

@ -1,21 +0,0 @@
namespace MobailApp;
public partial class NewPage1 : ContentPage
{
int count = 0;
public NewPage1()
{
InitializeComponent();
}
private void OnCounterClicked(object sender, EventArgs e)
{
count++;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
SemanticScreenReader.Announce(CounterBtn.Text);
}
}

View File

@ -1,12 +0,0 @@
<?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"
x:Class="MobailApp.NewPage2"
Title="NewPage2">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

View File

@ -1,9 +0,0 @@
namespace MobailApp;
public partial class NewPage2 : ContentPage
{
public NewPage2()
{
InitializeComponent();
}
}