Skip to content

Commit

Permalink
Merge pull request #372 from eesast/dev
Browse files Browse the repository at this point in the history
v1.0.7
  • Loading branch information
DragonAura authored May 11, 2024
2 parents c124f8a + 5b56b9d commit a061c21
Show file tree
Hide file tree
Showing 9 changed files with 347 additions and 377 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ GitLink 镜像地址:[THUAI7: GitLink Mirror](https://www.gitlink.org.cn/EESAS

## 赛题背景

待定
![thuai7](resource/THUAI7.png)

在不久的未来,随着 AI 技术的飞速发展,人类探索太空的步伐也大大加快。太空安全对于国家安全的重要性与日俱增,因此,太空建设也成为了各国的重要任务。在这个全新的赛场上,由 AI 控制的高度自动化的太空舰船成为了竞技的主力。它们可以在太空中自由穿梭,执行各种任务,如资源采集、建筑建造、太空战斗等。 新领域的探索总是伴随着风险,太空中的舰船也不例外。在太空中,舰船之间的距离遥远,通讯延迟巨大,因此,舰船之间的冲突往往是在瞬息之间决定胜负。在这个竞技场上,AI 的控制能力、决策速度、战术策略等都将成为决定胜负的关键。

在远离地球的太空中,为了建立起牢固的防线,保卫美好的家园,一场激烈的战斗即将打响。你将扮演舰队指挥官,带领你的舰队在太空中展开一场激烈的战斗,为了最终的胜利,你需要制定合理的战术策略,部署舰船,利用资源,应对敌人的进攻,最终摧毁敌人的基地,夺取最终的胜利。

## 比赛规则

待定
https://docs.eesast.com/docs/contests/THUAI7/

## 软件架构

Expand Down
322 changes: 148 additions & 174 deletions installer/Page/DebugPage.xaml

Large diffs are not rendered by default.

157 changes: 79 additions & 78 deletions installer/Page/InstallPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,127 +4,128 @@
xmlns:viewModels="clr-namespace:installer.ViewModel"
x:Class="installer.Page.InstallPage"
Title="Installer">
<ScrollView Margin="20">
<ScrollView
Margin="20">

<Grid
HorizontalOptions="Center"
WidthRequest="600"
RowDefinitions="*,*,*,*,*,*,*,*,*,*"
ColumnDefinitions="*">
HorizontalOptions="Center"
WidthRequest="600"
RowDefinitions="*,*,*,*,*,*,*,*,*,*"
ColumnDefinitions="*">

<VerticalStackLayout
Grid.Row="0"
Grid.RowSpan="9"
HorizontalOptions="Center"
VerticalOptions="Center">
Grid.Row="0"
Grid.RowSpan="9"
HorizontalOptions="Center"
VerticalOptions="Center">

<HorizontalStackLayout>
<Label
WidthRequest="100"
Text="文件路径:"
VerticalOptions="Center"
FontSize="16"/>
WidthRequest="100"
Text="文件路径:"
VerticalOptions="Center"
FontSize="16"/>
<Entry
WidthRequest="380"
Placeholder="请输入文件路径……"
Text="{Binding DownloadPath}"
FontSize="16"/>
WidthRequest="380"
Placeholder="请输入文件路径……"
Text="{Binding DownloadPath}"
FontSize="16"/>
<Button
WidthRequest="120"
Text="选择文件夹"
BorderWidth="2"
Command="{Binding BrowseBtnClickedCommand}"
IsEnabled="{Binding BrowseEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
TextColor="{Binding ConstTextColor}"/>
WidthRequest="120"
Text="选择文件夹"
BorderWidth="2"
Command="{Binding BrowseBtnClickedCommand}"
IsEnabled="{Binding BrowseEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
TextColor="{Binding ConstTextColor}"/>
</HorizontalStackLayout>

<Button
Text="{Binding DownloadBtnText}"
BorderWidth="2"
Command="{Binding DownloadBtnClickedCommand}"
IsEnabled="{Binding DownloadEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>

<HorizontalStackLayout>
<Button
WidthRequest="200"
Text="检查更新"
Text="{Binding DownloadBtnText}"
BorderWidth="2"
Command="{Binding CheckUpdBtnClickedCommand}"
IsEnabled="{Binding CheckEnabled}"
Command="{Binding DownloadBtnClickedCommand}"
IsEnabled="{Binding DownloadEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>

<HorizontalStackLayout>
<Button
WidthRequest="400"
Text="更新"
BorderWidth="2"
Command="{Binding UpdateBtnClickedCommand}"
IsEnabled="{Binding UpdateEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>
WidthRequest="200"
Text="检查更新"
BorderWidth="2"
Command="{Binding CheckUpdBtnClickedCommand}"
IsEnabled="{Binding CheckEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>
<Button
WidthRequest="400"
Text="更新"
BorderWidth="2"
Command="{Binding UpdateBtnClickedCommand}"
IsEnabled="{Binding UpdateEnabled}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>
</HorizontalStackLayout>

<HorizontalStackLayout>
<CheckBox
IsChecked="{Binding Installed}"
IsEnabled="False"/>
IsChecked="{Binding Installed}"
IsEnabled="False"/>
<Label
WidthRequest="200"
Text="是否已下载选手包"
VerticalOptions="Center"
FontSize="{Binding ConstFontSize}"/>
WidthRequest="200"
Text="是否已下载选手包"
VerticalOptions="Center"
FontSize="{Binding ConstFontSize}"/>
</HorizontalStackLayout>

<Label
Text="{Binding DebugAlert}"/>
Text="{Binding DebugAlert}"/>

<VerticalStackLayout>
<Label
Text="{Binding NumReport}"
HorizontalOptions="End"
FontSize="14"/>
Text="{Binding NumReport}"
HorizontalOptions="End"
FontSize="14"/>
<ProgressBar
Progress="{Binding NumPro}"
HeightRequest="10"
WidthRequest="580"/>
Progress="{Binding NumPro}"
HeightRequest="10"
WidthRequest="580"/>
</VerticalStackLayout>

<VerticalStackLayout
IsVisible="{Binding BigFileProEnabled}">
IsVisible="{Binding BigFileProEnabled}">
<Label
Text="{Binding FileReport}"
HorizontalOptions="End"
FontSize="14"/>
Text="{Binding FileReport}"
HorizontalOptions="End"
FontSize="14"/>
<ProgressBar
Progress="{Binding FilePro}"
HeightRequest="10"
WidthRequest="580"/>
Progress="{Binding FilePro}"
HeightRequest="10"
WidthRequest="580"/>
</VerticalStackLayout>

<Frame
BorderColor="Gray"
Padding="3"
Margin="5"
WidthRequest="600"
HeightRequest="250">
BorderColor="Gray"
Padding="3"
Margin="5"
WidthRequest="600"
HeightRequest="250">

<CollectionView
BackgroundColor="LightGray"
ItemsSource="{Binding LogCollection}"
ItemsUpdatingScrollMode="KeepLastItemInView"
VerticalScrollBarVisibility="Always">
BackgroundColor="LightGray"
ItemsSource="{Binding LogCollection}"
ItemsUpdatingScrollMode="KeepLastItemInView"
VerticalScrollBarVisibility="Always">
<CollectionView.ItemTemplate>
<DataTemplate>

<Label
WidthRequest="570"
Text="{Binding Message}"
TextColor="{Binding Color}"/>
WidthRequest="570"
Text="{Binding Message}"
TextColor="{Binding Color}"/>

</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down
67 changes: 34 additions & 33 deletions installer/Page/LoginPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,60 @@
xmlns:viewModels="clr-namespace:installer.ViewModel"
x:Class="installer.Page.LoginPage"
Title="Login">
<ScrollView Margin="20">
<ScrollView
Margin="20">

<Grid
HorizontalOptions="Center"
WidthRequest="500"
RowDefinitions="*,*,*,*,*,*,*,*,*,*">
HorizontalOptions="Center"
WidthRequest="500"
RowDefinitions="*,*,*,*,*,*,*,*,*,*">

<VerticalStackLayout
Grid.Row="0"
Grid.RowSpan="8"
WidthRequest="500"
HorizontalOptions="Center"
VerticalOptions="Center">
Grid.Row="0"
Grid.RowSpan="8"
WidthRequest="500"
HorizontalOptions="Center"
VerticalOptions="Center">

<Editor
Placeholder="请输入EESAST账户名……"
Text="{Binding Username}"
FontSize="20"/>
Placeholder="请输入EESAST账户名……"
Text="{Binding Username}"
FontSize="20"/>
<Entry
Placeholder="请输入EESAST账户密码……"
IsPassword="True"
Text="{Binding Password}"
ReturnCommand="{Binding LoginBtnClickedCommand}"
FontSize="20"/>
Placeholder="请输入EESAST账户密码……"
IsPassword="True"
Text="{Binding Password}"
ReturnCommand="{Binding LoginBtnClickedCommand}"
FontSize="20"/>

<HorizontalStackLayout>
<CheckBox
IsChecked="{Binding Remember}"
VerticalOptions="Center"/>
IsChecked="{Binding Remember}"
VerticalOptions="Center"/>
<Label
Text="记住我"
FontSize="18"
VerticalOptions="Center"/>
Text="记住我"
FontSize="18"
VerticalOptions="Center"/>
</HorizontalStackLayout>

<Label
Text="{Binding ID}"
FontSize="{Binding ConstFontSize}"/>
Text="{Binding ID}"
FontSize="{Binding ConstFontSize}"/>

<Label
Text="{Binding LoginStatus}"
FontSize="{Binding ConstFontSize}"/>
Text="{Binding LoginStatus}"
FontSize="{Binding ConstFontSize}"/>

<Label
Text="{Binding RemStatus}"
FontSize="{Binding ConstFontSize}"/>
Text="{Binding RemStatus}"
FontSize="{Binding ConstFontSize}"/>

<Button
Text="登录"
Command="{Binding LoginBtnClickedCommand}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>
Text="登录"
Command="{Binding LoginBtnClickedCommand}"
BackgroundColor="{Binding ConstBackgroundColor}"
FontSize="{Binding ConstFontSize}"
TextColor="{Binding ConstTextColor}"/>

</VerticalStackLayout>

Expand Down
Loading

0 comments on commit a061c21

Please sign in to comment.