修改
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArgumentNullException_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F7fcc41fe48c43f71d1476329de953fce8565fcc5dbf3c8c6fdb81c216b19c4_003FArgumentNullException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArgumentNullException_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F7fcc41fe48c43f71d1476329de953fce8565fcc5dbf3c8c6fdb81c216b19c4_003FArgumentNullException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AComboBox_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F41_003Faa378fa3_003FComboBox_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AComboBox_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F41_003Faa378fa3_003FComboBox_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AConvert_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde3edec1170e48a0a2478d8743508635c8e910_003Fa4_003F5147c5a0_003FConvert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADockStyle_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F1e_003F1b6a177c_003FDockStyle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADockStyle_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F1e_003F1b6a177c_003FDockStyle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde3edec1170e48a0a2478d8743508635c8e910_003F1b_003F30d746c0_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde3edec1170e48a0a2478d8743508635c8e910_003F1b_003F30d746c0_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeWindow_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F63_003F48c3a174_003FNativeWindow_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeWindow_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F63_003F48c3a174_003FNativeWindow_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeWindow_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fda570befe0d840bbba1e7d691e03cce1cef908_003F89_003F17236176_003FNativeWindow_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeWindow_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fda570befe0d840bbba1e7d691e03cce1cef908_003F89_003F17236176_003FNativeWindow_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANumericUpDown_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003Fd7_003Fc86c2a94_003FNumericUpDown_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APath_002EWindows_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4c2266d9aba4c4ba36aec62278534ed6bbd881431c65810dd69b8d57bbf_003FPath_002EWindows_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APath_002EWindows_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4c2266d9aba4c4ba36aec62278534ed6bbd881431c65810dd69b8d57bbf_003FPath_002EWindows_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APropertyInfo_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde3edec1170e48a0a2478d8743508635c8e910_003F07_003F70ad38ae_003FPropertyInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APropertyInfo_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde3edec1170e48a0a2478d8743508635c8e910_003F07_003F70ad38ae_003FPropertyInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATextBoxBase_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F73_003F00565224_003FTextBoxBase_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATextBoxBase_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fce02df019cd24b8b9cbae16d58cdd1e7cee8a0_003F73_003F00565224_003FTextBoxBase_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Server": "127.0.0.1:20001",
|
"Server": "127.0.0.1:20001",
|
||||||
"Heartbeat": 5,
|
"Heartbeat": 5,
|
||||||
"ProtocolScriptPath": "D:\\work\\Fishing2\\Assets\\Scripts\\Generate"
|
"ProtocolScriptPath": "D:\\myself\\Games\\Fishing2\\Assets\\Scripts\\Generate\\NetworkProtocol"
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ public partial class Form1 : Form
|
|||||||
|
|
||||||
_scriptLoader = new ScriptLoader();
|
_scriptLoader = new ScriptLoader();
|
||||||
|
|
||||||
|
SetAccountComboBox();
|
||||||
var time = UnityEngine.Time.time;
|
var time = UnityEngine.Time.time;
|
||||||
Log.Init(logTextBox);
|
Log.Init(logTextBox);
|
||||||
InitProtocol();
|
InitProtocol();
|
||||||
@@ -57,7 +57,7 @@ public partial class Form1 : Form
|
|||||||
LoadProtocol();
|
LoadProtocol();
|
||||||
StartAsync().Coroutine();
|
StartAsync().Coroutine();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwitchLoginButtonState()
|
private void SwitchLoginButtonState()
|
||||||
{
|
{
|
||||||
if (_session == null)
|
if (_session == null)
|
||||||
@@ -141,6 +141,16 @@ public partial class Form1 : Form
|
|||||||
|
|
||||||
private Session? _session;
|
private Session? _session;
|
||||||
|
|
||||||
|
private void SetAccountComboBox()
|
||||||
|
{
|
||||||
|
comboBoxAccount.Items.Clear();
|
||||||
|
|
||||||
|
foreach (var type in _config.Accounts)
|
||||||
|
{
|
||||||
|
comboBoxAccount.Items.Add(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async FTask OnLoginButtonClick(string account)
|
private async FTask OnLoginButtonClick(string account)
|
||||||
{
|
{
|
||||||
// 根据用户名来选择目标的鉴权服务器
|
// 根据用户名来选择目标的鉴权服务器
|
||||||
@@ -240,40 +250,6 @@ public partial class Form1 : Form
|
|||||||
Log.Succeed($"登录到Gate服务器成功!ErrorCode:{responseGate.ErrorCode}");
|
Log.Succeed($"登录到Gate服务器成功!ErrorCode:{responseGate.ErrorCode}");
|
||||||
|
|
||||||
|
|
||||||
// // 发送登录的请求给服务器
|
|
||||||
// var response = (A2C_LoginResponse)await _session.Call(new C2A_LoginRequest()
|
|
||||||
// {
|
|
||||||
// Username = acc,
|
|
||||||
// Password = acc,
|
|
||||||
// LoginType = 1
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// if (response.ErrorCode != 0)
|
|
||||||
// {
|
|
||||||
// Log.Error($"登录发生错误{response.ErrorCode}");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (!_scene.GetComponent<JWTParseComponent>().Parse(response.ToKen, out var payload))
|
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 根据ToKen返回的Address登录到Gate服务器
|
|
||||||
// _session = SessionHelper.CreateSession(_scene, payload.Address, OnConnectComplete, OnConnectFail,
|
|
||||||
// OnConnectDisconnect);
|
|
||||||
// // 发送登录请求到Gate服务器
|
|
||||||
// var loginResponse = (G2C_LoginResponse)await _session.Call(new C2G_LoginRequest()
|
|
||||||
// {
|
|
||||||
// ToKen = response.ToKen
|
|
||||||
// });
|
|
||||||
// if (loginResponse.ErrorCode != 0)
|
|
||||||
// {
|
|
||||||
// Log.Error($"登录发生错误{loginResponse.ErrorCode}");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Log.Succeed($"登录到Gate服务器成功!ErrorCode:{loginResponse.ErrorCode}");
|
|
||||||
SwitchLoginButtonState();
|
SwitchLoginButtonState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,6 +291,10 @@ public partial class Form1 : Form
|
|||||||
_config.Server = cfg.Server;
|
_config.Server = cfg.Server;
|
||||||
_config.Heartbeat = cfg.Heartbeat;
|
_config.Heartbeat = cfg.Heartbeat;
|
||||||
_config.ProtocolScriptPath = cfg.ProtocolScriptPath;
|
_config.ProtocolScriptPath = cfg.ProtocolScriptPath;
|
||||||
|
foreach (var cfgAccount in cfg.Accounts)
|
||||||
|
{
|
||||||
|
_config.Accounts.Add(cfgAccount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -326,6 +306,7 @@ public partial class Form1 : Form
|
|||||||
var configPath = Path.Combine(Application.StartupPath, "Config.json");
|
var configPath = Path.Combine(Application.StartupPath, "Config.json");
|
||||||
var json = JsonSerializer.Serialize(_config);
|
var json = JsonSerializer.Serialize(_config);
|
||||||
File.WriteAllText(configPath, json);
|
File.WriteAllText(configPath, json);
|
||||||
|
SetAccountComboBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -478,38 +459,17 @@ public partial class Form1 : Form
|
|||||||
};
|
};
|
||||||
inputControl = checkbox;
|
inputControl = checkbox;
|
||||||
}
|
}
|
||||||
else if (property.PropertyType == typeof(int) || property.PropertyType == typeof(long) ||
|
else if (property.PropertyType == typeof(int) || property.PropertyType == typeof(decimal) ||
|
||||||
property.PropertyType == typeof(double) ||
|
property.PropertyType == typeof(uint) || property.PropertyType == typeof(double) ||
|
||||||
property.PropertyType == typeof(decimal) || property.PropertyType == typeof(float))
|
property.PropertyType == typeof(float) || property.PropertyType == typeof(long) ||
|
||||||
|
property.PropertyType == typeof(short))
|
||||||
{
|
{
|
||||||
var numericBox = new NumericUpDown
|
var numericBox = new NumericUpDown
|
||||||
{
|
{
|
||||||
Value = Convert.ToDecimal(property.GetValue(configObject)),
|
|
||||||
Dock = DockStyle.Fill,
|
|
||||||
Minimum = decimal.MinValue,
|
Minimum = decimal.MinValue,
|
||||||
Maximum = decimal.MaxValue
|
Maximum = decimal.MaxValue,
|
||||||
};
|
|
||||||
inputControl = numericBox;
|
|
||||||
}
|
|
||||||
else if (property.PropertyType == typeof(uint))
|
|
||||||
{
|
|
||||||
var numericBox = new NumericUpDown
|
|
||||||
{
|
|
||||||
Value = Convert.ToDecimal(property.GetValue(configObject)),
|
Value = Convert.ToDecimal(property.GetValue(configObject)),
|
||||||
Dock = DockStyle.Fill,
|
Dock = DockStyle.Fill,
|
||||||
Minimum = uint.MinValue,
|
|
||||||
Maximum = uint.MaxValue
|
|
||||||
};
|
|
||||||
inputControl = numericBox;
|
|
||||||
}
|
|
||||||
else if (property.PropertyType == typeof(short))
|
|
||||||
{
|
|
||||||
var numericBox = new NumericUpDown
|
|
||||||
{
|
|
||||||
Value = Convert.ToDecimal(property.GetValue(configObject)),
|
|
||||||
Dock = DockStyle.Fill,
|
|
||||||
Minimum = short.MinValue,
|
|
||||||
Maximum = short.MaxValue
|
|
||||||
};
|
};
|
||||||
inputControl = numericBox;
|
inputControl = numericBox;
|
||||||
}
|
}
|
||||||
@@ -613,6 +573,8 @@ public partial class Form1 : Form
|
|||||||
property.SetValue(configObject, (float)numericBox.Value);
|
property.SetValue(configObject, (float)numericBox.Value);
|
||||||
else if (property.PropertyType == typeof(short))
|
else if (property.PropertyType == typeof(short))
|
||||||
property.SetValue(configObject, (short)numericBox.Value);
|
property.SetValue(configObject, (short)numericBox.Value);
|
||||||
|
else if (property.PropertyType == typeof(long))
|
||||||
|
property.SetValue(configObject, (long)numericBox.Value);
|
||||||
}
|
}
|
||||||
else if (inputControl is TextBox textBox)
|
else if (inputControl is TextBox textBox)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user