Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hhzzff authored Apr 17, 2024
2 parents fca6ac8 + bcc4a09 commit 46b2297
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 104 deletions.
4 changes: 2 additions & 2 deletions installer/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<ShellContent
Title="Launch"
ContentTemplate="{DataTemplate local:LaunchPage}"/>
<ShellContent
<!--<ShellContent
Title="Login"
ContentTemplate="{DataTemplate local:LoginPage}"/>
ContentTemplate="{DataTemplate local:LoginPage}"/>-->
<ShellContent
Title="Help"
ContentTemplate="{DataTemplate local:HelpPage}"/>
Expand Down
186 changes: 93 additions & 93 deletions installer/Page/HelpPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,103 +5,103 @@
x:Class="installer.Page.HelpPage"
Title="Help">

<VerticalStackLayout
WidthRequest="600"
<ScrollView
WidthRequest="750"
HeightRequest="500"
HorizontalOptions="Center">
<VerticalStackLayout>

<Label
Text="Installer"
FontAttributes="Bold"
FontSize="24"/>
<Frame
BorderColor="Gray"
Padding="10"
Margin="5"
VerticalOptions="FillAndExpand"
WidthRequest="700">
<CollectionView
ItemsSource="{Binding InstallerHelp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
Text="{Binding Title}"
FontSize="{Binding TitleSize}" />
<Label
Text="{Binding Content}"
FontSize="{Binding ContentSize}"/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Frame>

<Label/>
<Label/>
<Label
Text="Launcher"
FontAttributes="Bold"
FontSize="24"/>
<Frame
BorderColor="Gray"
Padding="10"
Margin="5"
VerticalOptions="FillAndExpand"
WidthRequest="700">
<CollectionView
ItemsSource="{Binding LauncherHelp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
Text="{Binding Title}"
FontSize="{Binding TitleSize}" />
<Label
Text="{Binding Content}"
FontSize="{Binding ContentSize}"/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Frame>

<Label
Text="Installer"
FontAttributes="Bold"
FontSize="24"/>
<Frame
BorderColor="Gray"
Padding="10"
Margin="5"
VerticalOptions="FillAndExpand"
WidthRequest="600">
<CollectionView
ItemsSource="{Binding InstallerHelp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
Text="{Binding Title}"
FontSize="{Binding TitleSize}" />
<Label
Text="{Binding Content}"
FontSize="{Binding ContentSize}"/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Frame>
<Label
Text="Other"
FontAttributes="Bold"
FontSize="24"/>
<Frame
BorderColor="Gray"
Padding="10"
Margin="5"
VerticalOptions="FillAndExpand"
WidthRequest="700">
<CollectionView
ItemsSource="{Binding OtherHelp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
Text="{Binding Title}"
FontSize="{Binding TitleSize}" />
<Label
Text="{Binding Content}"
FontSize="{Binding ContentSize}"/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Frame>

<Label
Text="Launcher"
FontAttributes="Bold"
FontSize="24"/>
<Frame
BorderColor="Gray"
Padding="10"
Margin="5"
VerticalOptions="FillAndExpand"
WidthRequest="600">
<CollectionView
ItemsSource="{Binding LauncherHelp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
Text="{Binding Title}"
FontSize="{Binding TitleSize}" />
<Label
Text="{Binding Content}"
FontSize="{Binding ContentSize}"/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Frame>
<Label/>
<Label/>

<Label
Text="Other"
FontAttributes="Bold"
FontSize="24"/>
<Frame
BorderColor="Gray"
Padding="10"
Margin="5"
VerticalOptions="FillAndExpand"
WidthRequest="600">
<CollectionView
ItemsSource="{Binding OtherHelp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label
Text="{Binding Title}"
FontSize="{Binding TitleSize}" />
<Label
Text="{Binding Content}"
FontSize="{Binding ContentSize}"/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Frame>

<Label/>
<Label/>

<Label
Text="祝大家 Debug 快乐!"
FontAttributes="Bold"
FontSize="22"
HorizontalOptions="Center"/>

</VerticalStackLayout>
<Label
Text="祝大家 Debug 快乐!"
FontAttributes="Bold"
FontSize="22"
HorizontalOptions="Center"/>

</VerticalStackLayout>
</ScrollView>

</ContentPage>
9 changes: 2 additions & 7 deletions installer/ViewModel/HelpViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public HelpViewModel()
new HelpMessage
{
Title = "选择安装路径",
Content = "> 下载功能需要选择空文件夹路径,否则该路径下所有文件将丢失"
Content = "> 下载功能需要选择空文件夹路径。"
},
new HelpMessage
{
Expand All @@ -35,11 +35,6 @@ public HelpViewModel()
{
Title = "更新",
Content = "> 更新前请先进行检查更新操作。"
},
new HelpMessage
{
Title = "按钮全部不可用",
Content = "> 如果选择的文件夹之前曾经下载过THUAI7,那么请在“文档-THUAI7-config.json”中添加项“\"Installed\": true”"
}
});

Expand Down Expand Up @@ -85,7 +80,7 @@ public HelpMessage(string? t = null, string? c = null)
}
public string? Title { get; set; }
public string? Content { get; set; }
public string TitleSize { get; } = "20";
public string TitleSize { get; } = "18";
public string ContentSize { get; } = "16";
}
}
1 change: 1 addition & 0 deletions installer/ViewModel/InstallViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ private void BrowseBtnClicked()
else
{
DownloadEnabled = true;
CheckEnabled = true;
}
BrowseEnabled = true;
});
Expand Down
4 changes: 2 additions & 2 deletions installer/ViewModel/LaunchViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public string? Mode
set
{
mode = value;
OnPropertyChanged();
if (mode == "Playback")
{
playbackFileChanged = true;
Expand All @@ -96,6 +95,7 @@ public string? Mode
PlaybackVisible = false;
DebugVisible = false;
}
OnPropertyChanged();
}
}

Expand Down Expand Up @@ -483,7 +483,7 @@ private void Start()
var py = Process.Start(new ProcessStartInfo()
{
FileName = "cmd.exe",
Arguments = "/c python"
Arguments = "/c python "
+ Path.Combine(Downloader.Data.Config.InstallPath, "CAPI", "python", "PyAPI", "main.py")
+ $" -I {IP} -P {Port} -t {teamID} -p {playerID} -o"
});
Expand Down

0 comments on commit 46b2297

Please sign in to comment.