|
4 | 4 | xmlns:lang="using:Avalonia.CpuLimiter.Lang" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | | - mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400" |
8 | | - Width="600" Height="400" |
| 7 | + mc:Ignorable="d" d:DesignWidth="650" d:DesignHeight="400" |
| 8 | + Width= "620" Height="400" |
| 9 | + MaxWidth="800" |
9 | 10 | x:Class="Avalonia.CpuLimiter.Views.MainWindow" |
10 | 11 | x:DataType="vm:MainWindowViewModel" |
11 | 12 | Icon="/Assets/avalonia-logo.ico" |
12 | 13 | Title="Game Launcher" |
13 | 14 | TransparencyLevelHint="AcrylicBlur" |
14 | 15 | Background="Transparent" |
15 | | - ExtendClientAreaToDecorationsHint="False" |
| 16 | + ExtendClientAreaToDecorationsHint="True" |
16 | 17 | WindowStartupLocation="CenterScreen"> |
17 | 18 |
|
18 | 19 | <Design.DataContext> |
|
35 | 36 |
|
36 | 37 | <!-- window menu --> |
37 | 38 | <DockPanel> |
38 | | - <Menu DockPanel.Dock="Top"> |
| 39 | + <Menu DockPanel.Dock="Top" HorizontalAlignment="Left" FontSize="14"> |
39 | 40 | <MenuItem Name="FileButton" Header="{x:Static lang:Resources.FileButton}"> |
40 | | - <MenuItem Header="Open" Command="{Binding ChooseExeFileCommand}" FontSize="13"/> |
| 41 | + <MenuItem Header="Open" Command="{Binding ChooseExeFile}" FontSize="13"/> |
41 | 42 | <MenuItem Header="Save" Command="{Binding}" FontSize="13"/> |
42 | 43 | <Separator/> |
43 | 44 | <MenuItem Header="Exit" Click="OnExitButtonClicked" FontSize="13"/> |
|
79 | 80 | <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
80 | 81 | <!-- SelectedItem="{Binding HistoryItems[0]}" --> |
81 | 82 | <ComboBox Name="HistoryComboBox" HorizontalAlignment="Center" Padding="15 0 15 5" |
82 | | - FontSize="16" FontWeight="Bold" |
83 | | - PlaceholderText="Input the Program Path" |
84 | | - PlaceholderForeground="Yellow" |
| 83 | + FontSize="16" |
| 84 | + MinWidth="400" |
| 85 | + Height="40" |
85 | 86 | ItemsSource="{Binding HistoryItems}" |
| 87 | + SelectionChanged="OnSelectionChanged" |
86 | 88 | ToolTip.Tip="Store no more than five records"> |
87 | 89 |
|
88 | 90 | <ComboBox.ItemTemplate> |
89 | 91 | <DataTemplate DataType="vm:HistoryItemViewModel"> |
90 | | - <Grid ColumnDefinitions="* Auto"> |
91 | | - <TextBlock Grid.Column="0" Text="{Binding Path}" |
| 92 | + <Grid ColumnDefinitions="* Auto" |
| 93 | + |
| 94 | + RowDefinitions="30" |
| 95 | + Margin="0" MinWidth="40"> |
| 96 | + <TextBox Grid.Column="0" Text="{Binding Path}" |
| 97 | + HorizontalAlignment="Left" |
| 98 | + VerticalContentAlignment="Center" |
92 | 99 | FontSize="16" |
93 | | - Width="300" |
94 | | - Height="20"/> |
95 | | - <Button Grid.Column="1" Padding="10" |
| 100 | + Height="20" |
| 101 | + Margin="0 5 1 5" |
| 102 | + Padding="0 0 0 0" |
| 103 | + BorderThickness="0" |
| 104 | + Background="Transparent"/> |
| 105 | + <Button Grid.Column="1" Padding="1 10 0 10" |
| 106 | + Margin="8 0" |
| 107 | + Width="38" |
| 108 | + Height="38" |
96 | 109 | Command="{Binding }" |
97 | 110 | CommandParameter="{Binding .}"> |
98 | 111 | <PathIcon Data="{StaticResource DeleteRegular}" Padding="0 10" IsVisible="True"/> |
|
117 | 130 | Padding="10" |
118 | 131 | Width="40" |
119 | 132 | BorderBrush="Black" |
120 | | - ToolTip.Tip="Open the file explorer to select exe file" |
121 | | - Command="{Binding ChooseExeFileCommand}"> |
| 133 | + ToolTip.Tip="Open the file explorer to select" |
| 134 | + Command="{Binding ChooseExeFile}"> |
122 | 135 | </Button> |
123 | 136 | </StackPanel> |
124 | | - |
125 | | - |
126 | | - <Separator Margin="0 20"/> |
| 137 | + <Separator Margin="0 30"/> |
127 | 138 | <Slider Name="slider" BorderBrush="Orange" |
128 | 139 | Minimum="1" Maximum="16" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="TopLeft" |
129 | 140 | Width="400" Value="{Binding CpuCoreCount}" |
130 | | - ToolTip.Tip="Adjust the cpu core numbers used by the Game program"> |
| 141 | + ToolTip.Tip="Adjust the cpu core numbers used by the Game program" |
| 142 | + PointerWheelChanged="OnPointerWheelChanged"> |
131 | 143 | </Slider> |
132 | 144 |
|
133 | 145 | <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
|
137 | 149 | <!-- HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Padding="0"/> --> |
138 | 150 |
|
139 | 151 | <TextBox Margin="10 0 0 0" HorizontalAlignment="Center" |
140 | | - Padding="10 10 10 10" |
| 152 | + VerticalContentAlignment="Center" |
| 153 | + Padding="0 0 0 0" |
141 | 154 | Width="1" |
| 155 | + MinWidth="40" |
| 156 | + Height="40" |
142 | 157 | TextAlignment="Center" |
143 | 158 | Text="{Binding CpuCoreCount}" FontSize="18" |
144 | 159 | FontWeight="Bold" IsReadOnly="False"></TextBox> |
|
154 | 169 | <!-- <PathIcon Data="{StaticResource GamesRegular}"/> --> |
155 | 170 | </Button> |
156 | 171 |
|
| 172 | + <TextBlock Name="Auxiliary" Text="{Binding GamePath}" IsVisible="False"/> |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | + |
157 | 177 |
|
158 | 178 |
|
159 | 179 | </StackPanel> |
|
0 commit comments