|
3 | 3 | xmlns:vm="using:Avalonia.CpuLimiter.ViewModels" |
4 | 4 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
5 | 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
6 | | - mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="350" |
| 6 | + mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400" |
7 | 7 | Width="600" Height="400" |
8 | 8 | x:Class="Avalonia.CpuLimiter.Views.MainWindow" |
9 | 9 | x:DataType="vm:MainWindowViewModel" |
10 | 10 | Icon="/Assets/avalonia-logo.ico" |
11 | | - Title="Avalonia.CpuLimiter" |
| 11 | + Title="Game Launcher" |
12 | 12 | TransparencyLevelHint="AcrylicBlur" |
13 | 13 | Background="Transparent" |
14 | 14 | ExtendClientAreaToDecorationsHint="False" |
|
36 | 36 | <DockPanel> |
37 | 37 | <Menu DockPanel.Dock="Top"> |
38 | 38 | <MenuItem Header="File"> |
39 | | - <MenuItem Header="Open" Command="{Binding ChooseExeFileCommand}"/> |
40 | | - <MenuItem Header="Exit" Command="{Binding ExitProgramCommand}"/> |
| 39 | + <MenuItem Header="Open" Command="{Binding ChooseExeFileCommand}" FontSize="13"/> |
| 40 | + <MenuItem Header="Save" Command="{Binding}" FontSize="13"/> |
| 41 | + <Separator/> |
| 42 | + <MenuItem Header="Exit" Command="{Binding ExitProgramCommand}" FontSize="13"/> |
41 | 43 | </MenuItem> |
42 | 44 |
|
43 | 45 | <MenuItem Header="_Edit"> |
44 | | - <MenuItem Header="Cut"/> |
45 | | - <MenuItem Header="Copy"/> |
46 | | - <MenuItem Header="Paste"/> |
| 46 | + <MenuItem Header="Cut" FontSize="13"/> |
| 47 | + <MenuItem Header="Copy" FontSize="13"/> |
| 48 | + <MenuItem Header="Paste" FontSize="13"/> |
47 | 49 | </MenuItem> |
48 | 50 |
|
49 | 51 | <MenuItem Header="_Setting"> |
50 | | - <MenuItem Header="View"/> |
51 | | - <MenuItem Header="Config"/> |
| 52 | + <MenuItem Header="View" FontSize="13"/> |
| 53 | + <MenuItem Header="Config" FontSize="13"/> |
52 | 54 | </MenuItem> |
53 | 55 |
|
54 | 56 | <MenuItem Header="_Run"> |
55 | | - <MenuItem Header="Run Game" Command="{Binding RunGameCommand}"/> |
| 57 | + <MenuItem Header="Launch Game" Command="{Binding RunGameCommand}" FontSize="13"/> |
56 | 58 | </MenuItem> |
57 | 59 |
|
58 | 60 | <MenuItem Header="_Help"> |
59 | | - <MenuItem Header="Docs"/> |
60 | | - <MenuItem Header="About Author"/> |
61 | | - <MenuItem Header="Project website"></MenuItem> |
| 61 | + <MenuItem Header="Docs" FontSize="13" Command="{Binding OpenDocsCommand}" |
| 62 | + ToolTip.Tip="Click to open docs in browser"/> |
| 63 | + <Separator/> |
| 64 | + <MenuItem Header="Project website" FontSize="13" Command="{Binding OpenProjWebsiteCommand}"/> |
| 65 | + <MenuItem Header="About" FontSize="13" Command="{Binding OpenAboutWindowCommand}"/> |
62 | 66 | </MenuItem> |
63 | 67 |
|
64 | 68 | </Menu> |
65 | 69 |
|
66 | 70 | <!-- content --> |
67 | 71 | <StackPanel> |
| 72 | + |
| 73 | + <TextBlock FontSize="18" FontWeight="Bold" Foreground="DodgerBlue" |
| 74 | + HorizontalAlignment="Center" Padding="20"> |
| 75 | + Exe File Path |
| 76 | + </TextBlock> |
68 | 77 |
|
69 | | - <Button Content="Select Executable File" HorizontalAlignment="Center" |
70 | | - Background="Beige" Foreground="Black" Margin="20 20 20 20" |
71 | | - Command="{Binding ChooseExeFileCommand}"/> |
72 | | - |
73 | | - <StackPanel Orientation="Horizontal"> |
74 | | - |
75 | | - <TextBlock FontSize="18" FontWeight="Bold" Foreground="Fuchsia" |
76 | | - HorizontalAlignment="Center" Padding="15"> |
77 | | - Exe File Path |
78 | | - </TextBlock> |
79 | | - |
| 78 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
80 | 79 | <TextBox Text="{Binding GamePath}" Name="GamePathTextBox" |
81 | 80 | HorizontalAlignment="Center" |
82 | | - Padding="15" FontSize="16"/> |
83 | | - |
| 81 | + Padding="30 8 30 0" FontSize="16"/> |
| 82 | + |
| 83 | + <Button Content=" ... " HorizontalAlignment="Center" |
| 84 | + Background="Beige" Foreground="Black" |
| 85 | + Margin="5 0 0 0" |
| 86 | + Padding="10" |
| 87 | + Width="40" |
| 88 | + BorderBrush="Black" |
| 89 | + ToolTip.Tip="Open the file explorer to select exe file" |
| 90 | + Command="{Binding ChooseExeFileCommand}"/> |
84 | 91 | </StackPanel> |
85 | 92 |
|
| 93 | + |
| 94 | + <Separator Margin="0 20"/> |
| 95 | + <Slider Name="slider" BorderBrush="Orange" |
| 96 | + Minimum="1" Maximum="16" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="TopLeft" |
| 97 | + Width="400" Value="{Binding CpuCoreCount}" |
| 98 | + ToolTip.Tip="Adjust the cpu core numbers used by the Game program"> |
| 99 | + </Slider> |
| 100 | + |
| 101 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
| 102 | + <TextBlock FontSize="18" FontWeight="Bold" Margin="10 6 10 0" |
| 103 | + HorizontalAlignment="Center">Cpu Core Number:</TextBlock> |
| 104 | + <!-- <TextBlock Text="{Binding #slider.Value}" --> |
| 105 | + <!-- HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Padding="0"/> --> |
| 106 | + |
| 107 | + <TextBox Margin="10 0 0 0" HorizontalAlignment="Center" |
| 108 | + Padding="10 10 10 10" |
| 109 | + Width="1" |
| 110 | + TextAlignment="Center" |
| 111 | + Text="{Binding CpuCoreCount}" FontSize="18" |
| 112 | + FontWeight="Bold" IsReadOnly="False"></TextBox> |
| 113 | + </StackPanel> |
86 | 114 | <Button FontStyle="Normal" |
87 | 115 | Foreground="Orange" Command="{Binding RunGameCommand}" |
88 | 116 | HorizontalAlignment="Center" VerticalAlignment="Center" |
89 | | - Margin="10" Padding="15" |
90 | | - ToolTip.Tip="Run the selected Game"> |
91 | | - <PathIcon Data="{StaticResource GamesRegular}"/> |
| 117 | + FontSize="16" FontWeight="Bold" |
| 118 | + Margin="10 20" Padding="14" |
| 119 | + ToolTip.Tip="Run the selected Game" |
| 120 | + Content="Launch the Game"> |
| 121 | + <!-- <PathIcon Data="{StaticResource GamesRegular}"/> --> |
92 | 122 | </Button> |
| 123 | + |
93 | 124 | </StackPanel> |
94 | 125 | </DockPanel> |
95 | 126 |
|
|
0 commit comments