cache 6.23
This commit is contained in:
parent
cf7aa467b9
commit
788a823b60
@ -82,7 +82,7 @@ namespace Zerolauncher
|
||||
for (int i = 0; i < 3 && !TryDeleteDirectory(@"./cache", true); i++) await Task.Delay(3000);
|
||||
}
|
||||
});
|
||||
DataStream.Load();
|
||||
DataStreamNew.Load();
|
||||
_ = WebApiManager.StartListener();
|
||||
AccountManager.initLoadData();
|
||||
}
|
||||
|
||||
9
Defender/SystemSha.cs
Normal file
9
Defender/SystemSha.cs
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
namespace Zerolauncher.Defender
|
||||
{
|
||||
class SystemSha
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -92,7 +92,7 @@ namespace Zerolauncher
|
||||
MenuItem menuItem = sender as MenuItem;
|
||||
int i = (int)menuItem.Tag;
|
||||
Trace.WriteLine("Clicked item index: " + i);
|
||||
AccountManager.reloadData(i);
|
||||
AccountManager.ChangeTeam(i);
|
||||
ReloadBtn();
|
||||
};
|
||||
changeTeamItem.Items.Add(menuItem);
|
||||
|
||||
@ -1,115 +1,93 @@
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Zerolauncher.Manager
|
||||
{
|
||||
internal class AccountManager
|
||||
{
|
||||
static int teamIndex=0;
|
||||
static int teamId=0;
|
||||
|
||||
public static string teamName = "";
|
||||
|
||||
public static List<Account> accountsList = new List<Account>();
|
||||
public static List<AccountNew>? accountsList;
|
||||
|
||||
public static void initLoadData()
|
||||
{
|
||||
teamIndex = DataStream.dataStream.teamIndex;
|
||||
var group = DataStream.dataStream.Groups[teamIndex];
|
||||
teamName = group.Name;
|
||||
foreach (var acc in group.Accounts)
|
||||
teamId = AccountData.teamIndex;
|
||||
foreach (var pair in GroupsData.data)
|
||||
{
|
||||
accountsList.Add(acc);
|
||||
Trace.WriteLine(pair.Key, pair.Value);
|
||||
}
|
||||
teamName = GroupsData.data[teamId];
|
||||
accountsList = AccountData.data[teamId];
|
||||
}
|
||||
|
||||
public static void reloadData(int index = -1)
|
||||
public static void ChangeTeam(int index)
|
||||
{
|
||||
if (index < 0) index = teamIndex;
|
||||
var group = DataStream.dataStream.Groups[index];
|
||||
if (teamIndex!=index)
|
||||
{
|
||||
teamIndex = index;
|
||||
teamName = group.Name;
|
||||
DataStream.dataStream.teamIndex = index;
|
||||
DataStream.write();
|
||||
}
|
||||
accountsList.Clear();
|
||||
foreach (var acc in group.Accounts)
|
||||
{
|
||||
accountsList.Add(acc);
|
||||
}
|
||||
teamId = TeamManager.Index2Key(index);
|
||||
teamId = AccountData.teamIndex;
|
||||
teamName = GroupsData.data[teamId];
|
||||
accountsList = AccountData.data[teamId];
|
||||
}
|
||||
|
||||
public static void saveEdit()
|
||||
{
|
||||
DataStream.write();
|
||||
DataStreamNew.Save();
|
||||
MainWindow.Instance.ReloadBtn();
|
||||
}
|
||||
|
||||
public static bool AddAccount(Account account)
|
||||
public static bool AddAccount(AccountNew account)
|
||||
{
|
||||
if (TeamManager.Nick2Acc(account.nickName) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var group = DataStream.dataStream.Groups[teamIndex];
|
||||
group.Accounts.Add(account);
|
||||
account.groupId = teamId;
|
||||
AccountData.AddAccount(account);
|
||||
|
||||
accountsList.Add(account);
|
||||
DataStream.write();
|
||||
DataStreamNew.Save();
|
||||
MainWindow.Instance.ReloadBtn();
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool AddAccounts(Account account)
|
||||
public static bool AddAccounts(AccountNew account)
|
||||
{
|
||||
if (TeamManager.Nick2Acc(account.nickName) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var group = DataStream.dataStream.Groups[teamIndex];
|
||||
group.Accounts.Add(account);
|
||||
|
||||
accountsList.Add(account);
|
||||
//DataStream.write(); 不写
|
||||
//MainWindow.Instance.ReloadBtn(); 不更新
|
||||
account.groupId = teamId;
|
||||
AccountData.AddAccount(account);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void MoveAccount(int memberId, int newIndex)
|
||||
{
|
||||
var group1 = DataStream.dataStream.Groups[newIndex];
|
||||
group1.Accounts.Add(accountsList[memberId]);
|
||||
var group = DataStream.dataStream.Groups[teamIndex];
|
||||
group.Accounts.RemoveAt(memberId);
|
||||
DataStream.write();
|
||||
reloadData();
|
||||
var group_id = TeamManager.Index2Key(newIndex);
|
||||
var acc = accountsList[memberId];
|
||||
accountsList.RemoveAt(memberId);
|
||||
AccountData.CheckGroup(group_id);
|
||||
AccountData.data[group_id].Add(acc);
|
||||
DataStreamNew.Save();
|
||||
MainWindow.Instance.ReloadBtn();
|
||||
}
|
||||
|
||||
public static void DeleteAccount(int index) {
|
||||
var group = DataStream.dataStream.Groups[teamIndex];
|
||||
group.Accounts.RemoveAt(index);
|
||||
DataStream.write();
|
||||
reloadData();
|
||||
var nick = accountsList[index].nickName;
|
||||
accountsList.RemoveAt(index);
|
||||
AccountData.dict.Remove(nick);
|
||||
DataStreamNew.Save();
|
||||
MainWindow.Instance.ReloadBtn();
|
||||
}
|
||||
|
||||
public static void editTeamName(string teamName0)
|
||||
{
|
||||
teamName = teamName0;
|
||||
var group = DataStream.dataStream.Groups[teamIndex];
|
||||
group.Name = teamName;
|
||||
DataStream.write();
|
||||
GroupsData.data[teamId] = teamName;
|
||||
DataStreamNew.Save();
|
||||
}
|
||||
|
||||
public static bool DeleteTeam()
|
||||
{
|
||||
if (DataStream.dataStream.Groups.Count == 1)
|
||||
if (GroupsData.data.Keys.Count == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
DataStream.dataStream.Groups.RemoveAt(teamIndex);
|
||||
DataStream.write();
|
||||
reloadData(0);
|
||||
AccountData.RemoveGroup();
|
||||
ChangeTeam(GroupsData.data.Keys.First());
|
||||
DataStreamNew.Save();
|
||||
MainWindow.Instance.ReloadBtn();
|
||||
return true;
|
||||
}
|
||||
@ -118,38 +96,24 @@ namespace Zerolauncher.Manager
|
||||
|
||||
internal class TeamManager
|
||||
{
|
||||
|
||||
public static int Index2Key(int index) { return GroupsData.data.ElementAt(index).Key; }
|
||||
public static string[] GetAllTeamName()
|
||||
{
|
||||
string[] names = new string[DataStream.dataStream.Groups.Count];
|
||||
int i = 0;
|
||||
foreach (var group in DataStream.dataStream.Groups)
|
||||
{
|
||||
names[i++] = group.Name;
|
||||
}
|
||||
return names;
|
||||
return GroupsData.data.Values.ToArray();
|
||||
}
|
||||
|
||||
public static void addTeam(string teamName)
|
||||
{
|
||||
var group = new Group { Name = teamName, Accounts = new List<Account> { } };
|
||||
DataStream.dataStream.Groups.Add(group);
|
||||
DataStream.write();
|
||||
GroupsData.data.Add(GroupsData.data.Keys.LastOrDefault() + 1, teamName);
|
||||
DataStreamNew.Save();
|
||||
}
|
||||
|
||||
//运行时才能决定是否执行内联
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static Account? Nick2Acc(string nickName)
|
||||
public static AccountNew? Nick2Acc(string nickName)
|
||||
{
|
||||
// find and return first take
|
||||
foreach (var group in DataStream.dataStream.Groups)
|
||||
{
|
||||
foreach (var acc in group.Accounts)
|
||||
{
|
||||
if (acc.nickName.Equals(nickName)) return acc;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
return AccountData.dict.ContainsKey(nickName)? AccountData.dict[nickName]:null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
336
Manager/DataStreamNew.cs
Normal file
336
Manager/DataStreamNew.cs
Normal file
@ -0,0 +1,336 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace Zerolauncher.Manager
|
||||
{
|
||||
enum NameSpace
|
||||
{
|
||||
Accounts,
|
||||
Groups,
|
||||
ecs,
|
||||
None
|
||||
}
|
||||
|
||||
static class DataStreamNew
|
||||
{
|
||||
private const string path = "users.data";
|
||||
static byte[] key = [9, 5, 33, 64, 99, 200, 66, 77];
|
||||
static int hearder_version = 20240531;
|
||||
|
||||
static void InitHandle(NameSpace ns, DataItem item)
|
||||
{
|
||||
switch (ns)
|
||||
{
|
||||
case NameSpace.Accounts:
|
||||
AccountData.Init(item);
|
||||
break;
|
||||
case NameSpace.Groups:
|
||||
GroupsData.Init(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static DataItem[] GetAllData() { return [GroupsData.Out(), AccountData.Out()]; }
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
byte[] byteArray;
|
||||
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
byteArray = new byte[fs.Length];
|
||||
fs.Read(byteArray, 0, byteArray.Length);
|
||||
}
|
||||
ByteCry(byteArray);
|
||||
byteArray = Decompress(byteArray);
|
||||
{
|
||||
var data = new DataItem(NameSpace.None, byteArray);
|
||||
if (data.ReadInt() != hearder_version)
|
||||
{
|
||||
data.ReSetOffset();
|
||||
OldDataUpdate(data);
|
||||
return;
|
||||
}
|
||||
NameSpace _id;
|
||||
int _lenght;
|
||||
while (!data.IsEnd())
|
||||
{
|
||||
_id = (NameSpace)data.ReadInt();
|
||||
_lenght = data.ReadInt();
|
||||
|
||||
InitHandle(_id, new DataItem(_id, data.GetBytes(_lenght)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
InitDefaultData();
|
||||
}
|
||||
|
||||
static void OldDataUpdate(DataItem _item)
|
||||
{
|
||||
InitDefaultData();
|
||||
}
|
||||
|
||||
static void InitDefaultData()
|
||||
{
|
||||
Trace.WriteLine("加载初始数据");
|
||||
GroupsData.InitDefaultData();
|
||||
AccountData.InitDefaultData();
|
||||
}
|
||||
|
||||
public static void Save()
|
||||
{
|
||||
byte[] buffer;
|
||||
{
|
||||
DataItem buffers = new(NameSpace.None, []);
|
||||
buffers.WriteInt(hearder_version);
|
||||
foreach (DataItem item in GetAllData())
|
||||
{
|
||||
buffers.Write(BitConverter.GetBytes((uint)item.id));
|
||||
buffers.Write(BitConverter.GetBytes(item.value.Length));
|
||||
buffers.Write(item.value);
|
||||
}
|
||||
buffer = CompressBytes(buffers.value);
|
||||
ByteCry(buffer);
|
||||
}
|
||||
using (FileStream file = new(path, FileMode.OpenOrCreate, FileAccess.ReadWrite))
|
||||
{
|
||||
file.Write(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void ByteCry(byte[] data)
|
||||
{
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
data[i] = (byte)(data[i] ^ key[i % key.Length]);
|
||||
}
|
||||
}
|
||||
|
||||
//压缩字节
|
||||
//1.创建压缩的数据流
|
||||
//2.设定compressStream为存放被压缩的文件流,并设定为压缩模式
|
||||
//3.将需要压缩的字节写到被压缩的文件流
|
||||
static byte[] CompressBytes(byte[] bytes)
|
||||
{
|
||||
using (MemoryStream compressStream = new MemoryStream())
|
||||
{
|
||||
using (var zipStream = new GZipStream(compressStream, CompressionMode.Compress))
|
||||
zipStream.Write(bytes, 0, bytes.Length);
|
||||
return compressStream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
//解压缩字节
|
||||
//1.创建被压缩的数据流
|
||||
//2.创建zipStream对象,并传入解压的文件流
|
||||
//3.创建目标流
|
||||
//4.zipStream拷贝到目标流
|
||||
//5.返回目标流输出字节
|
||||
static byte[] Decompress(byte[] bytes)
|
||||
{
|
||||
using (var compressStream = new MemoryStream(bytes))
|
||||
{
|
||||
using (var zipStream = new GZipStream(compressStream, CompressionMode.Decompress))
|
||||
{
|
||||
using (var resultStream = new MemoryStream())
|
||||
{
|
||||
zipStream.CopyTo(resultStream);
|
||||
return resultStream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DataItem
|
||||
{
|
||||
public NameSpace id;
|
||||
int offset = 0;
|
||||
public byte[] value;
|
||||
|
||||
public DataItem(NameSpace id, byte[] value)
|
||||
{
|
||||
this.id = id;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public bool IsEnd() { return offset >= value.Length - 1; }
|
||||
|
||||
public void ReSetOffset()
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(int lenght)
|
||||
{
|
||||
offset += lenght;
|
||||
return value.Skip(offset - lenght).Take(lenght).ToArray();
|
||||
}
|
||||
|
||||
public int ReadInt()
|
||||
{
|
||||
offset += 4;
|
||||
return BitConverter.ToInt32(value, offset - 4);
|
||||
|
||||
}
|
||||
public String ReadStr()
|
||||
{
|
||||
int lenght = ReadInt();
|
||||
offset += lenght;
|
||||
return System.Text.Encoding.UTF8.GetString(value, offset - lenght, lenght);
|
||||
}
|
||||
|
||||
public void Write(byte[] bytes)
|
||||
{
|
||||
var arr = new byte[bytes.Length + value.Length];
|
||||
Array.Copy(value, arr, value.Length);
|
||||
Array.Copy(bytes, 0, arr, value.Length, bytes.Length);
|
||||
value = arr;
|
||||
}
|
||||
|
||||
public void WriteInt(int value)
|
||||
{
|
||||
Write(BitConverter.GetBytes(value));
|
||||
}
|
||||
|
||||
public void WriteString(string value)
|
||||
{
|
||||
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(value);
|
||||
WriteInt(bytes.Length);
|
||||
Write(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
public class AccountNew
|
||||
{
|
||||
public int groupId, providerId, serverId;
|
||||
public string userName, userPWD, nickName;
|
||||
}
|
||||
|
||||
|
||||
static class AccountData
|
||||
{
|
||||
public static int teamIndex;
|
||||
|
||||
public static Dictionary<int, List<AccountNew>> data = [];
|
||||
|
||||
public static Dictionary<String, AccountNew> dict = [];
|
||||
|
||||
public static void Init(DataItem data)
|
||||
{
|
||||
data.ReSetOffset();
|
||||
teamIndex = data.ReadInt();
|
||||
var accountCount = data.ReadInt();
|
||||
for (int i = 0; i < accountCount; i++)
|
||||
{
|
||||
AddAccount(new AccountNew()
|
||||
{
|
||||
groupId = data.ReadInt(),
|
||||
providerId = data.ReadInt(),
|
||||
serverId = data.ReadInt(),
|
||||
userName = data.ReadStr(),
|
||||
userPWD = data.ReadStr(),
|
||||
nickName = data.ReadStr()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitDefaultData()
|
||||
{
|
||||
AddAccount(new AccountNew()
|
||||
{
|
||||
groupId = 0,
|
||||
providerId = 0,
|
||||
serverId = 1,
|
||||
userName = "test",
|
||||
userPWD = "test",
|
||||
nickName = "右键修改账号"
|
||||
});
|
||||
}
|
||||
|
||||
public static void AddAccount(AccountNew item)
|
||||
{
|
||||
int count = 0;
|
||||
while (dict.ContainsKey(item.nickName))
|
||||
item.nickName += count++.ToString();
|
||||
CheckGroup(item.groupId);
|
||||
data[item.groupId].Add(item);
|
||||
}
|
||||
|
||||
public static bool CheckGroup(int groupId)
|
||||
{
|
||||
if (GroupsData.data.ContainsKey(groupId))
|
||||
{
|
||||
if (!data.ContainsKey(groupId)) data.Add(groupId, new List<AccountNew> { });
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void RemoveGroup()
|
||||
{
|
||||
GroupsData.data.Remove(teamIndex);
|
||||
foreach (var item in data[teamIndex])
|
||||
{
|
||||
dict.Remove(item.nickName);
|
||||
}
|
||||
data.Remove(teamIndex);
|
||||
}
|
||||
|
||||
public static DataItem Out()
|
||||
{
|
||||
var res = new DataItem(NameSpace.Accounts, []);
|
||||
res.WriteInt(teamIndex);
|
||||
res.WriteInt(data.Count);
|
||||
foreach (var items in data.Values)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
res.WriteInt(item.groupId);
|
||||
res.WriteInt(item.providerId);
|
||||
res.WriteInt(item.serverId);
|
||||
res.WriteString(item.userName);
|
||||
res.WriteString(item.userPWD);
|
||||
res.WriteString(item.nickName);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
static class GroupsData
|
||||
{
|
||||
public static Dictionary<int, String> data = [];
|
||||
public static void Init(DataItem data)
|
||||
{
|
||||
int count = data.ReadInt();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
GroupsData.data.Add(data.ReadInt(), data.ReadStr());
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitDefaultData()
|
||||
{
|
||||
data.Add(0, "队伍1");
|
||||
}
|
||||
|
||||
public static DataItem Out()
|
||||
{
|
||||
var res = new DataItem(NameSpace.Groups, []);
|
||||
res.WriteInt(data.Count);
|
||||
foreach (var item in data)
|
||||
{
|
||||
res.WriteInt(item.Key);
|
||||
res.WriteString(item.Value);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -12,12 +12,12 @@ namespace Zerolauncher.Manager
|
||||
|
||||
//运行时才能决定是否执行内联
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
private static string AccToKey(Account account)
|
||||
private static string AccToKey(AccountNew account)
|
||||
{
|
||||
return string.Format("{0}{1}{2}", account.providerId, account.serverId, account.userName);
|
||||
}
|
||||
|
||||
public static bool CreateGame(Account account)
|
||||
public static bool CreateGame(AccountNew account)
|
||||
{
|
||||
if (UpDateData.is_check == false)
|
||||
{
|
||||
@ -62,14 +62,14 @@ namespace Zerolauncher.Manager
|
||||
return CreateGame(AccountManager.accountsList[memberId]);
|
||||
}
|
||||
|
||||
public static int CheckGameState(Account account)
|
||||
public static int CheckGameState(AccountNew account)
|
||||
{
|
||||
var key = AccToKey(account);
|
||||
if (mGame.ContainsKey(key)) { return mGame[key].mHandle; }
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static short TurnGameSizeMini(Account account)
|
||||
public static short TurnGameSizeMini(AccountNew account)
|
||||
{
|
||||
var key = AccToKey(account);
|
||||
if (mGame.ContainsKey(key))
|
||||
@ -85,7 +85,7 @@ namespace Zerolauncher.Manager
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static short TurnGameSizeNormal(Account account)
|
||||
public static short TurnGameSizeNormal(AccountNew account)
|
||||
{
|
||||
var key = AccToKey(account);
|
||||
if (mGame.ContainsKey(key))
|
||||
@ -101,7 +101,7 @@ namespace Zerolauncher.Manager
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static bool ExitGame(Account account)
|
||||
public static bool ExitGame(AccountNew account)
|
||||
{
|
||||
var key = AccToKey(account);
|
||||
if (!mGame.ContainsKey(key)) { return false; }
|
||||
@ -109,7 +109,7 @@ namespace Zerolauncher.Manager
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void OnGameExit(Account account)
|
||||
public static void OnGameExit(AccountNew account)
|
||||
{
|
||||
mGame.Remove(AccToKey(account));
|
||||
}
|
||||
@ -125,10 +125,10 @@ namespace Zerolauncher.Manager
|
||||
Process process;
|
||||
string? restartUrl;
|
||||
public int mHandle;
|
||||
public Account? account;
|
||||
public AccountNew? account;
|
||||
string gameMode;
|
||||
|
||||
public SingleGame(Account? acc, string mod = StaticHandleA.GameMode)
|
||||
public SingleGame(AccountNew? acc, string mod = StaticHandleA.GameMode)
|
||||
{
|
||||
restartUrl = null;
|
||||
account = acc;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Zerolauncher.util;
|
||||
@ -102,6 +103,11 @@ namespace Zerolauncher.Manager
|
||||
if (OnnxManager.onnxVerify == null) OnnxManager.onnxVerify = new OnnxVerify();
|
||||
|
||||
var verify = OnnxManager.onnxVerify.RunInference(new Bitmap(bin));
|
||||
using (var fileStream = File.Create("tmp.png"))
|
||||
{
|
||||
bin.Seek(0, SeekOrigin.Begin);//设置复制开始的地方
|
||||
bin.CopyTo(fileStream);
|
||||
}
|
||||
game.Send($"{StaticHandleS.VerifyDone} {verify}");
|
||||
Trace.WriteLine(verify);
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ namespace Zerolauncher.dialog
|
||||
}
|
||||
if (EditMemberDialog.member == null)
|
||||
{
|
||||
AccountManager.AddAccount(new Account { providerId = cb_pid.SelectedIndex, serverId = cb_sid.SelectedIndex, userName = edit_acc.Text, userPWD = edit_pwd.Password, nickName = edit_nick.Text });
|
||||
AccountManager.AddAccount(new AccountNew { providerId = cb_pid.SelectedIndex, serverId = cb_sid.SelectedIndex, userName = edit_acc.Text, userPWD = edit_pwd.Password, nickName = edit_nick.Text });
|
||||
|
||||
EditMemberDialog.Close();
|
||||
return;
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Zerolauncher.dialog
|
||||
MessageBox.Show($"文本在{i}行非法!\n{lines[i]}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
return;
|
||||
}
|
||||
var acc = new Account { };
|
||||
var acc = new AccountNew { };
|
||||
if (!int.TryParse(accTexts[0], out acc.providerId))
|
||||
{
|
||||
MessageBox.Show($"输入的服务商代号错误!在{i}行\n错误:[{lines[i]}]无法转换成服务器代号", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
9
util/SyStemExcuteCommand.cs
Normal file
9
util/SyStemExcuteCommand.cs
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
namespace Zerolauncher.util
|
||||
{
|
||||
static class SyStemExcuteCommand
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user