Browse Source

style: run format.sh

tags/0.1.0
Shawqeem 3 years ago
parent
commit
6ae9edcc44
2 changed files with 46 additions and 47 deletions
  1. +7
    -7
      logic/Client/AssemblyInfo.cs
  2. +39
    -40
      logic/Client/MainWindow.xaml.cs

+ 7
- 7
logic/Client/AssemblyInfo.cs View File

@@ -1,10 +1,10 @@
using System.Windows; 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)
[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)
)] )]

+ 39
- 40
logic/Client/MainWindow.xaml.cs View File

@@ -14,24 +14,24 @@ using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
using System.Diagnostics; using System.Diagnostics;


//留意初始化
//目前MainWindow还未复现的功能:
//左侧信息private void SetStatusBar(),
//private void ReactToCommandline(),
//private void Playback(string fileName, double pbSpeed = 2.0)
//绘图函数private void DrawLaser(Point source, double theta, double range,double Width)//三个参数分别为攻击者的位置,攻击方位角(窗口坐标)和攻击半径
// private void DrawProp(MessageToClient.Types.GameObjMessage data, string text),
// private void Attack(object sender,RoutedEventArgs e)
//地图相关private void ZoomMap(),private void DrawMap()
// 留意初始化
// 目前MainWindow还未复现的功能:
// 左侧信息private void SetStatusBar(),
// private void ReactToCommandline(),
// private void Playback(string fileName, double pbSpeed = 2.0)
// 绘图函数private void DrawLaser(Point source, double theta, double range,double Width)//三个参数分别为攻击者的位置,攻击方位角(窗口坐标)和攻击半径
// private void DrawProp(MessageToClient.Types.GameObjMessage data, string text),
// private void Attack(object sender,RoutedEventArgs e)
// 地图相关private void ZoomMap(),private void DrawMap()


//交互:private void ClickToSetMode(object sender, RoutedEventArgs e)
//最近要解决private void ConnectToServer(string[] comInfo)
//private void KeyBoardControl(object sender, KeyEventArgs e)
//private void GetMap(MessageToClient.Types.GameObjMessage obj)
//private void OnReceive()
//private bool CanSee(MessageOfCharacter msg) (以及两个重载函数)
//private void Refresh(object? sender, EventArgs e)
//private void Bonus()
// 交互:private void ClickToSetMode(object sender, RoutedEventArgs e)
// 最近要解决private void ConnectToServer(string[] comInfo)
// private void KeyBoardControl(object sender, KeyEventArgs e)
// private void GetMap(MessageToClient.Types.GameObjMessage obj)
// private void OnReceive()
// private bool CanSee(MessageOfCharacter msg) (以及两个重载函数)
// private void Refresh(object? sender, EventArgs e)
// private void Bonus()


namespace Client namespace Client
{ {
@@ -48,7 +48,7 @@ namespace Client
WindowStartupLocation = WindowStartupLocation.CenterScreen; WindowStartupLocation = WindowStartupLocation.CenterScreen;
} }


//之后需要修改,现在只具有修改按钮形状的功能,并不能实现暂停/继续
// 之后需要修改,现在只具有修改按钮形状的功能,并不能实现暂停/继续
private void ClickToPauseOrContinue(object sender, RoutedEventArgs e) private void ClickToPauseOrContinue(object sender, RoutedEventArgs e)
{ {
if (!isClientStocked) if (!isClientStocked)
@@ -62,18 +62,18 @@ namespace Client
PorC.Content = "⏸"; PorC.Content = "⏸";
} }
} }
//未复现
// 未复现
private void ClickToConnect(object sender, RoutedEventArgs e) private void ClickToConnect(object sender, RoutedEventArgs e)
{ {

} }


//窗口最大化、关闭、最小化、拖拽
// 窗口最大化、关闭、最小化、拖拽
private void ClickToMaxmize(object sender, RoutedEventArgs e) private void ClickToMaxmize(object sender, RoutedEventArgs e)
{ {
if (WindowState != WindowState.Maximized) if (WindowState != WindowState.Maximized)
WindowState = WindowState.Maximized; WindowState = WindowState.Maximized;
else WindowState = WindowState.Normal;
else
WindowState = WindowState.Normal;
} }
private void ClickToClose(object sender, RoutedEventArgs e) private void ClickToClose(object sender, RoutedEventArgs e)
{ {
@@ -88,7 +88,7 @@ namespace Client
DragMove(); DragMove();
} }


//寻求帮助、访问EESAST(部分功能未复原)
// 寻求帮助、访问EESAST(部分功能未复原)
private void ClickForHelp(object sender, RoutedEventArgs e) private void ClickForHelp(object sender, RoutedEventArgs e)
{ {
PleaseWait(); PleaseWait();
@@ -106,7 +106,7 @@ namespace Client
} }
} }


//配置连接(未复原)、我的AI(THUAI5未实现)、获取更新、天梯信息(可能需要网站协助)
// 配置连接(未复原)、我的AI(THUAI5未实现)、获取更新、天梯信息(可能需要网站协助)
private void ClickToSetConnect(object sender, RoutedEventArgs e) private void ClickToSetConnect(object sender, RoutedEventArgs e)
{ {
// ConnectRegister crg = new(); // ConnectRegister crg = new();
@@ -114,22 +114,22 @@ namespace Client
} }
private void ClickToEnterVS(object sender, RoutedEventArgs e) private void ClickToEnterVS(object sender, RoutedEventArgs e)
{ {
//try
// try
//{ //{
// if (!File.Exists("VSRoute.txt"))
// {
// File.Create("VSRoute.txt");
// Exception ex = new("没有路径存储文件,已为您创建。请将VS路径输入该文件,并重新操作。");
// throw ex;
// }//创建路径文件
// using StreamReader sr = new("VSRoute.txt");
// _ = Process.Start(sr.ReadLine());
//}
//catch (Exception exc)
// if (!File.Exists("VSRoute.txt"))
// {
// File.Create("VSRoute.txt");
// Exception ex = new("没有路径存储文件,已为您创建。请将VS路径输入该文件,并重新操作。");
// throw ex;
// }//创建路径文件
// using StreamReader sr = new("VSRoute.txt");
// _ = Process.Start(sr.ReadLine());
// }
// catch (Exception exc)
//{ //{
// ErrorDisplayer error = new("发生错误。以下是系统报告:\n" + exc.ToString());
// error.Show();
//}
// ErrorDisplayer error = new("发生错误。以下是系统报告:\n" + exc.ToString());
// error.Show();
// }
PleaseWait(); PleaseWait();
} }
private void ClickForUpdate(object sender, RoutedEventArgs e) private void ClickForUpdate(object sender, RoutedEventArgs e)
@@ -141,7 +141,7 @@ namespace Client
PleaseWait(); PleaseWait();
} }


//敬请期待函数
// 敬请期待函数
private void PleaseWait() private void PleaseWait()
{ {
try try
@@ -158,4 +158,3 @@ namespace Client
private bool isPlaybackMode; private bool isPlaybackMode;
} }
} }


Loading…
Cancel
Save