Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
chore: Add Client
Browse files Browse the repository at this point in the history
  • Loading branch information
TCL606 committed Oct 1, 2021
1 parent 80f817b commit 7188b01
Show file tree
Hide file tree
Showing 14 changed files with 425 additions and 2 deletions.
9 changes: 9 additions & 0 deletions logic/Client/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="Client.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Client"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions logic/Client/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace Client
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
10 changes: 10 additions & 0 deletions logic/Client/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
24 changes: 24 additions & 0 deletions logic/Client/Client.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>EESAST.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<None Remove="Logo.png" />
<None Remove="Warning.png" />
</ItemGroup>

<ItemGroup>
<Content Include="Logo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Warning.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>
Binary file added logic/Client/EESAST.ico
Binary file not shown.
14 changes: 14 additions & 0 deletions logic/Client/ErrorDisplayer.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Window x:Class="Client.ErrorDisplayer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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="clr-namespace:Client"
mc:Ignorable="d"
Title="ErrorDisplayer" Height="200" Width="350">
<Grid Margin="432,219,-0.4,0">
<TextBox Name="errorDisplayer" HorizontalAlignment="Left" Height="46" Margin="-373,-174,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="228" IsReadOnly="True"/>
<Image Margin="-415,-174,373,128" Stretch="Fill" Source="pack://siteoforigin:,,,/Warning.png"/>

</Grid>
</Window>
32 changes: 32 additions & 0 deletions logic/Client/ErrorDisplayer.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Client
{
/// <summary>
/// ErrorDisplayer.xaml 的交互逻辑
/// </summary>
public partial class ErrorDisplayer : Window
{
public ErrorDisplayer(string s)
{
InitializeComponent();
errorDisplayer.Text = s;
}
private void DragWindow(object sender, RoutedEventArgs e)
{
DragMove();
}
}
}
15 changes: 15 additions & 0 deletions logic/Client/InfoDisplayer.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Window x:Class="Client.InfoDisplayer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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="clr-namespace:Client"
mc:Ignorable="d"
Title="InfoDisplayer" Height="708" Width="300">
<Grid>
<Label Content="Label" HorizontalAlignment="Left" Height="140" Margin="50,40,0,0" VerticalAlignment="Top" Width="200"/>
<Label Content="Label" HorizontalAlignment="Left" Height="140" Margin="50,192,0,0" VerticalAlignment="Top" Width="200"/>
<Label Content="Label" HorizontalAlignment="Left" Height="140" Margin="50,344,0,0" VerticalAlignment="Top" Width="200"/>
<Label Content="Label" HorizontalAlignment="Left" Height="140" Margin="50,496,0,0" VerticalAlignment="Top" Width="200"/>
</Grid>
</Window>
36 changes: 36 additions & 0 deletions logic/Client/InfoDisplayer.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.ComponentModel;
namespace Client
{
/// <summary>
/// InfoDisplayer.xaml 的交互逻辑
/// </summary>

public partial class InfoDisplayer : Window
{
public InfoDisplayer()
{
InitializeComponent();
WindowStartupLocation = WindowStartupLocation.Manual;
Closing += new System.ComponentModel.CancelEventHandler((object sender, CancelEventArgs e) => { MainWindow.flag[teamNumber - 1]--; });
}

private void DragWindow(object sender, RoutedEventArgs e)
{
DragMove();
}
public int teamNumber;
}
}
Binary file added logic/Client/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions logic/Client/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<Window x:Class="Client.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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="clr-namespace:Client"
mc:Ignorable="d"
Title="ClientV" Height="700" Width="910" Background="White" ResizeMode="NoResize" WindowStyle="None" MouseLeftButtonDown="DragWindow">
<Window.Resources>

<ImageBrush x:Key="Logo" ImageSource="Logo.png"/>

</Window.Resources>
<Grid RenderTransformOrigin="0.902,0.078" Margin="0,0,-0.4,0" HorizontalAlignment="Left" Width="910">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="356*"/>
<ColumnDefinition Width="99*"/>
</Grid.ColumnDefinitions>

<Button Content="" HorizontalAlignment="Left" Height="25" VerticalAlignment="Bottom" Width="25" RenderTransformOrigin="0.597,-2.532" Margin="192,0,0,558" Background="Crimson" BorderBrush="Crimson" FontFamily="Microsoft YaHei" Click="ClickToBegin"/>
<Button Content="连接(C)" HorizontalAlignment="Left" Height="56" VerticalAlignment="Bottom" Width="60" RenderTransformOrigin="0.488,0.772" Margin="430,0,0,643" Background="White" FontFamily="Microsoft YaHei" FontSize="16" BorderBrush="White" Click="ClickToSetConnect"/>
<Button Content="" HorizontalAlignment="Left" Height="25" VerticalAlignment="Bottom" Width="25" RenderTransformOrigin="0.637,-0.304" Margin="192,0,0,528" Background="Green" BorderBrush="Green" FontFamily="Microsoft YaHei" Click="ClickToPause"/>
<Button Content="" HorizontalAlignment="Left" Height="53" VerticalAlignment="Bottom" Width="51" RenderTransformOrigin="0.488,0.772" Margin="146,0,0,647" Background="White" FontFamily="Microsoft YaHei" BorderBrush="White" Grid.Column="1" Click="ClickToClose"/>
<Button Content="" Height="53" VerticalAlignment="Bottom" RenderTransformOrigin="0.488,0.772" Margin="87,0,57.4,647" Background="White" FontFamily="Microsoft YaHei" BorderBrush="White" Grid.Column="1" Click="ClickToMinimize"/>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="15,352,0,0">
<Label Name="Label1_3" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="171" FontSize="20"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="15,477,0,0">
<Label Name="Label1_4" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="171" FontSize="20"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="15,237,0,0">
<Label Name="Label1_2" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="173" FontSize="20"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="15,117,0,0">
<Label Name="Label1_1" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="173" FontSize="20"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="13,117,0,0" Grid.Column="1">
<Label Name="Label2_1" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="171" FontSize="20" RenderTransformOrigin="0.5,0.5"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="13,237,0,0" Grid.Column="1">
<Label Name="Label2_2" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="172" FontSize="20"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="115" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="13,357,0,0" Grid.Column="1">
<Label Name="Label2_3" HorizontalAlignment="Left" Height="115" VerticalAlignment="Top" Width="170" FontSize="20"/>
</DockPanel>
<DockPanel HorizontalAlignment="Left" Height="120" LastChildFill="False" VerticalAlignment="Top" Width="172" Margin="13,477,0,0" Grid.Column="1">
<Label Name="Label2_4" HorizontalAlignment="Left" Height="120" VerticalAlignment="Top" Width="170" FontSize="20"/>
</DockPanel>
<Label Content="Team1 Gems: 0 Score: 0" HorizontalAlignment="Left" Height="46" Margin="15,53,0,0" VerticalAlignment="Top" Width="251" FontSize="20"/>
<Label Content="Team2 Gems: 0 Score: 0" HorizontalAlignment="Left" Height="46" Margin="625,53,0,0" VerticalAlignment="Top" Width="242" FontSize="20" Grid.ColumnSpan="2"/>
<ProgressBar Grid.ColumnSpan="2" HorizontalAlignment="Left" Height="13" Margin="10,99,0,0" VerticalAlignment="Top" Width="875" Background="Red"/>
<Button Content="展开Team1属性(Q)" HorizontalAlignment="Left" Height="38" Margin="34,639,0,0" VerticalAlignment="Top" Width="112" Background="Ivory" Click="CallTeam1Message"/>
<Button Content="展开Team2属性(P)" HorizontalAlignment="Left" Height="38" Margin="37,639,0,0" VerticalAlignment="Top" Width="112" Grid.Column="1" Click="CallTeam2Message" Background="Ivory"/>
<Label Content="THUAI5 Client for players |" HorizontalAlignment="Left" Height="46" Margin="57,10,0,0" VerticalAlignment="Top" Width="265" FontSize="20" />
<Button Content="" HorizontalAlignment="Left" Height="25" VerticalAlignment="Bottom" Width="25" RenderTransformOrigin="0.597,-2.532" Margin="192,0,0,498" Background="BlueViolet" BorderBrush="BlueViolet" FontFamily="Microsoft YaHei" Click="ClickToSetMode">
</Button>
<Button Content="关于我们(F)" HorizontalAlignment="Left" Height="38" Margin="388,639,0,0" VerticalAlignment="Top" Width="112" Background="Ivory" Click="ClickToVisitEESAST"/>
<Button Content="我的AI(M)" HorizontalAlignment="Left" Height="56" VerticalAlignment="Bottom" Width="82" RenderTransformOrigin="0.488,0.772" Margin="495,0,0,643" Background="White" FontFamily="Microsoft YaHei" FontSize="16" BorderBrush="White" Click="ClickToEnterVS"/>
<Button Content="获取更新(U)" HorizontalAlignment="Left" Height="56" VerticalAlignment="Bottom" Width="94" RenderTransformOrigin="0.488,0.772" Margin="582,0,0,643" Background="White" FontFamily="Microsoft YaHei" FontSize="16" BorderBrush="White" Click="ClickForUpdate"/>
<Button Content="天梯信息(L)" HorizontalAlignment="Left" Height="55" VerticalAlignment="Bottom" Width="99" RenderTransformOrigin="0.488,0.772" Margin="681,0,0,644" Background="White" FontFamily="Microsoft YaHei" FontSize="16" BorderBrush="White" Click="ClickToCheckLadder" Grid.ColumnSpan="2"/>
<Grid Name="Map" HorizontalAlignment="Left" Height="500" Margin="217,117,0,0" VerticalAlignment="Top" Width="500">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="0*"/>
</Grid.RowDefinitions>
</Grid>
<Image Margin="0,1,660,647" Stretch="Fill" Source="pack://siteoforigin:,,,/Logo.png" RenderTransformOrigin="0.511,1.002"/>
</Grid>
</Window>
Loading

0 comments on commit 7188b01

Please sign in to comment.