This repository was archived by the owner on Apr 12, 2026. It is now read-only.
forked from Stephanzion/YandexMusicBetaMod
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.axaml
More file actions
115 lines (108 loc) · 6.14 KB
/
Main.axaml
File metadata and controls
115 lines (108 loc) · 6.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="using:YandexMusicPatcherGui"
mc:Ignorable="d" d:DesignWidth="353" d:DesignHeight="240"
x:Class="YandexMusicPatcherGui.Main"
x:DataType="local:MainViewModel"
x:CompileBindings="True"
Icon="/Assets/icon.ico"
Title="Yandex Music Patcher"
Width="353" Height="240"
WindowStartupLocation="CenterScreen"
CornerRadius="8"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1"
Background="Transparent"
TransparencyLevelHint="Mica"
CanResize="False">
<Window.Styles>
<Style Selector="ProgressBar.AcrylicProgressBar">
<Setter Property="Height" Value="64" />
<Setter Property="Foreground" Value="#FFFFFF" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<ControlTemplate>
<Grid>
<Border x:Name="OuterBorder" CornerRadius="8" Background="#22FFFFFF" BorderBrush="#55FFFFFF"
BorderThickness="1">
<Grid>
<Border Name="PART_Track" CornerRadius="7" Background="Transparent" ClipToBounds="True">
<Border Name="PART_Indicator"
Background="#66FFFFFF"
HorizontalAlignment="Left"
CornerRadius="7">
<Border.Width>
<CompiledBinding Path="Value" Converter="{x:Static local:ProgressToWidthConverter.Instance}"
ConverterParameter="{CompiledBinding #PART_Track.Bounds.Width}"
RelativeSource="{RelativeSource TemplatedParent}" />
</Border.Width>
</Border>
</Border>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="ProgressBar.AcrylicProgressBar:indeterminate /template/ Border#PART_Indicator">
<Setter Property="Background" Value="#888888" />
</Style>
<Style Selector="Border.SlidingPanel">
<Setter Property="Background" Value="#CC000000" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="RenderTransform" Value="translateY(250px)" />
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="Border.SlidingPanel.Visible">
<Setter Property="RenderTransform" Value="translateY(0)" />
<Setter Property="Opacity" Value="1" />
</Style>
</Window.Styles>
<Panel Background="Transparent" PointerPressed="Window_MouseDown">
<Grid RowDefinitions="Auto, *, Auto" ColumnDefinitions="*" IsVisible="{Binding AreButtonsVisible}">
<RelativePanel Grid.Row="0" Margin="5,5,5,0">
<Button RelativePanel.AlignRightWithPanel="True" x:Name="CloseButton" Content="X" Width="22" Height="24" FontSize="14"
Click="CloseButton_Click" />
<StackPanel RelativePanel.AlignLeftWithPanel="True" Orientation="Horizontal">
<Button Content="{Binding PatchButtonContent}" Width="135" Height="25" FontSize="13"
IsEnabled="{Binding IsPatchButtonEnabled}" Command="{Binding PatchCommand}" />
<Button Content="Запустить Яндекс Музыку" Width="165" Height="25" FontSize="13"
Margin="5,0,0,0" IsEnabled="{Binding IsRunButtonEnabled}" Command="{Binding RunCommand}" IsVisible="{Binding IsRunButtonVisible}"/>
</StackPanel>
</RelativePanel>
<StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Bottom"
Margin="0,0,0,10">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,10" IsVisible="{Binding IsVersionTextVisible}">
<TextBlock Text="{Binding VersionText}" VerticalAlignment="Center" />
<Button Content="?" Width="20" Height="20" FontSize="12" Margin="5,0,0,0"
Command="{Binding OpenUpdateUrlCommand}" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="Доступно обновление" Width="150" Height="25" FontSize="13"
IsVisible="{Binding IsUpdateButtonVisible}" Command="{Binding OpenUpdateUrlCommand}" />
</StackPanel>
</StackPanel>
</Grid>
<Grid IsVisible="{Binding IsProgressBarVisible}">
<ProgressBar Classes="AcrylicProgressBar"
IsIndeterminate="{Binding IsProgressIndeterminate}"
Value="{Binding ProgressValue}"
Width="315"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
<TextBlock Text="{Binding StatusText}"
Foreground="White"
FontWeight="Bold"
FontSize="22"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextAlignment="Center"
TextWrapping="Wrap"
Width="315"/>
</Grid>
</Panel>
</Window>