Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5129f68dad | |||
| 8e3535ecf6 | |||
| 52393d8d67 | |||
| 9f11d1b60a | |||
| 877a2ff495 | |||
| b66cea26e8 | |||
| 85e1cc90ba | |||
| 5fd102c0dc | |||
| d888391758 | |||
| 8f2f5f79b6 | |||
| b87eef10fe | |||
| f6f5da37b6 |
@ -39,14 +39,14 @@
|
|||||||
<TextBlock Text="Contact me" HorizontalAlignment="Center" Foreground="#FF81EB78"/>
|
<TextBlock Text="Contact me" HorizontalAlignment="Center" Foreground="#FF81EB78"/>
|
||||||
<TextBlock HorizontalAlignment="Center">
|
<TextBlock HorizontalAlignment="Center">
|
||||||
<Hyperlink NavigateUri="https://github.com/1415ddfer/ZeroHelper" Click="Hyperlink_Click">
|
<Hyperlink NavigateUri="https://github.com/1415ddfer/ZeroHelper" Click="Hyperlink_Click">
|
||||||
My GitHub
|
@52Pojie
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock HorizontalAlignment="Center">
|
<!--<TextBlock HorizontalAlignment="Center">
|
||||||
<Hyperlink NavigateUri="http://www.example.com" Click="Hyperlink_Click_1">
|
<Hyperlink NavigateUri="http://www.example.com" Click="Hyperlink_Click_1">
|
||||||
ddfgame@foxmail.com
|
ddfgame@foxmail.com
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Label/>
|
<Label/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Zerolauncher.AboutDialog
|
|||||||
|
|
||||||
private void Hyperlink_Click(object sender, RoutedEventArgs e)
|
private void Hyperlink_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start(new ProcessStartInfo("http://github.com/1415ddfer/ZeroHelper") { UseShellExecute = true });
|
Process.Start(new ProcessStartInfo("https://www.52pojie.cn/home.php?mod=space&uid=1235138") { UseShellExecute = true });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Hyperlink_Click_1(object sender, RoutedEventArgs e)
|
private void Hyperlink_Click_1(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
xmlns:MyNamespace="clr-namespace:Zerolauncher.controls"
|
xmlns:MyNamespace="clr-namespace:Zerolauncher.controls"
|
||||||
AllowsTransparency="True" WindowStyle="None" Background="Transparent"
|
AllowsTransparency="True" WindowStyle="None" Background="Transparent"
|
||||||
Title="零蛋登陆器" Height="300" Width="500" MouseLeftButtonDown="Window_MouseLeftButtonDown">
|
Title="零蛋登陆器" Height="300" Width="500" MouseLeftButtonDown="Window_MouseLeftButtonDown">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<!-- 使用透明背景的PNG图片作为窗口的背景 -->
|
<!-- 使用透明背景的PNG图片作为窗口的背景 -->
|
||||||
<Image Source="/res/1.png" Stretch="Fill"/>
|
<Image Source="/res/1.png" Stretch="Fill"/>
|
||||||
@ -20,7 +19,7 @@
|
|||||||
<MyNamespace:AirButton Background="Transparent" Height="21" Width="30" Click="Button_Click_3" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}">
|
<MyNamespace:AirButton Background="Transparent" Height="21" Width="30" Click="Button_Click_3" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}">
|
||||||
<Image Source="/res/btn_close1.png"/>
|
<Image Source="/res/btn_close1.png"/>
|
||||||
</MyNamespace:AirButton>
|
</MyNamespace:AirButton>
|
||||||
<MyNamespace:AirButton Background="Transparent" Height="21" Width="30" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}">
|
<MyNamespace:AirButton Background="Transparent" Height="21" Width="30" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}" Click="AirButton_Click_1">
|
||||||
<Image Source="/res/btn_mini1.png"/>
|
<Image Source="/res/btn_mini1.png"/>
|
||||||
</MyNamespace:AirButton>
|
</MyNamespace:AirButton>
|
||||||
<MyNamespace:AirButton Background="Transparent" Height="20" Width="30" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}" Margin="5,0,0,0" Click="AirButton_Click">
|
<MyNamespace:AirButton Background="Transparent" Height="20" Width="30" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}" Margin="5,0,0,0" Click="AirButton_Click">
|
||||||
@ -28,7 +27,7 @@
|
|||||||
</MyNamespace:AirButton>
|
</MyNamespace:AirButton>
|
||||||
<Label/>
|
<Label/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<ScrollViewer x:Name="memberBG" VerticalScrollBarVisibility="Auto" Margin="10,3,10,10">
|
<ScrollViewer x:Name="memberBG" VerticalScrollBarVisibility="Auto" Margin="15,3,10,10">
|
||||||
<WrapPanel Name="mLayout">
|
<WrapPanel Name="mLayout">
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -133,5 +133,9 @@ namespace Zerolauncher
|
|||||||
ab.ShowDialog();
|
ab.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AirButton_Click_1(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
WindowState = WindowState.Minimized;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,6 +81,7 @@ namespace Zerolauncher.Manager
|
|||||||
var group = DataStream.dataStream.Groups[teamIndex];
|
var group = DataStream.dataStream.Groups[teamIndex];
|
||||||
group.Accounts.RemoveAt(memberId);
|
group.Accounts.RemoveAt(memberId);
|
||||||
DataStream.write();
|
DataStream.write();
|
||||||
|
reloadData();
|
||||||
MainWindow.Instance.ReloadBtn();
|
MainWindow.Instance.ReloadBtn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Zerolauncher.Manager
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
client.Timeout = TimeSpan.FromMinutes(3);
|
client.Timeout = TimeSpan.FromMinutes(3);
|
||||||
response = await client.GetAsync($"{StaticUrl.QMessageMain}{StaticUrl.LoveMessage}");
|
response = await client.GetAsync($"{StaticUrl.QMessageMain}{StaticUrl.MasterMessage}");
|
||||||
}
|
}
|
||||||
catch (Exception _ex)
|
catch (Exception _ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -24,11 +24,11 @@ namespace Zerolauncher.Manager
|
|||||||
MessageBox.Show("正在更新游戏数据,请等待1-3秒。\n 请检查网络", "错误", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show("正在更新游戏数据,请等待1-3秒。\n 请检查网络", "错误", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (UpDateManager.state)
|
//if (UpDateManager.state)
|
||||||
{
|
//{
|
||||||
UpDateManager.DoUpdate();
|
// UpDateManager.DoUpdate();
|
||||||
return true;
|
// return true;
|
||||||
}
|
//}
|
||||||
var key = AccToKey(account);
|
var key = AccToKey(account);
|
||||||
if (mGame.ContainsKey(key)) { return false; }
|
if (mGame.ContainsKey(key)) { return false; }
|
||||||
if (CacheSha.errorCode != 0) {
|
if (CacheSha.errorCode != 0) {
|
||||||
@ -170,6 +170,7 @@ namespace Zerolauncher.Manager
|
|||||||
|
|
||||||
private void Handle(object sender, DataReceivedEventArgs e)
|
private void Handle(object sender, DataReceivedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Trace.WriteLine($"from client:{e.Data}");
|
||||||
var lines = e.Data == null? [""] : e.Data.Split(" ", 2); // 切成两半
|
var lines = e.Data == null? [""] : e.Data.Split(" ", 2); // 切成两半
|
||||||
switch (lines[0])
|
switch (lines[0])
|
||||||
{
|
{
|
||||||
@ -241,45 +242,47 @@ namespace Zerolauncher.Manager
|
|||||||
public static Process CheckEngineSafe(string mod)
|
public static Process CheckEngineSafe(string mod)
|
||||||
{
|
{
|
||||||
bool is_first_luancher = EngineManager.CheckEmpy();
|
bool is_first_luancher = EngineManager.CheckEmpy();
|
||||||
if (mod == StaticHandleA.UpdateMode)
|
//#region 检测代码
|
||||||
{
|
//if (mod == StaticHandleA.UpdateMode)
|
||||||
if (DataStream.dataStream.ecs.Length > 10)
|
//{
|
||||||
{
|
// if (DataStream.dataStream.ecs.Length > 10)
|
||||||
string? now_bit;
|
// {
|
||||||
using (SHA256 sha256 = SHA256.Create())
|
// string? now_bit;
|
||||||
{
|
// using (SHA256 sha256 = SHA256.Create())
|
||||||
using (FileStream fileStream = File.OpenRead(engine_file))
|
// {
|
||||||
{
|
// using (FileStream fileStream = File.OpenRead(engine_file))
|
||||||
byte[] hashBytes = sha256.ComputeHash(fileStream);
|
// {
|
||||||
now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty);
|
// byte[] hashBytes = sha256.ComputeHash(fileStream);
|
||||||
}
|
// now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty);
|
||||||
}
|
// }
|
||||||
if (DataStream.dataStream.ecs != now_bit)
|
// }
|
||||||
{
|
// if (DataStream.dataStream.ecs != now_bit)
|
||||||
Trace.WriteLine("lalalala" + DataStream.dataStream.ecs);
|
// {
|
||||||
throw new FileReadException("error esu1!");
|
// Trace.WriteLine("lalalala" + DataStream.dataStream.ecs);
|
||||||
}
|
// throw new FileReadException("error esu1!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if (!is_check && is_first_luancher)
|
//}
|
||||||
{
|
//else if (!is_check && is_first_luancher)
|
||||||
string? now_bit;
|
//{
|
||||||
using (SHA256 sha256 = SHA256.Create())
|
// string? now_bit;
|
||||||
{
|
// using (SHA256 sha256 = SHA256.Create())
|
||||||
using (FileStream fileStream = File.OpenRead(engine_file))
|
// {
|
||||||
{
|
// using (FileStream fileStream = File.OpenRead(engine_file))
|
||||||
byte[] hashBytes = sha256.ComputeHash(fileStream);
|
// {
|
||||||
now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty);
|
// byte[] hashBytes = sha256.ComputeHash(fileStream);
|
||||||
}
|
// now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty);
|
||||||
}
|
// }
|
||||||
if (CacheSha.GetE() != now_bit)
|
// }
|
||||||
{
|
// if (CacheSha.GetE() != now_bit)
|
||||||
Trace.WriteLine("lalalala1");
|
// {
|
||||||
throw new FileReadException("error esu0!");
|
// Trace.WriteLine("lalalala1");
|
||||||
}
|
// throw new FileReadException("error esu0!");
|
||||||
if (DataStream.dataStream.ecs != now_bit) { DataStream.dataStream.ecs = now_bit; DataStream.write(); }
|
// }
|
||||||
is_check = true;
|
// if (DataStream.dataStream.ecs != now_bit) { DataStream.dataStream.ecs = now_bit; DataStream.write(); }
|
||||||
}
|
// is_check = true;
|
||||||
|
//}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
var process = new Process
|
var process = new Process
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,13 +2,12 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Runtime.ConstrainedExecution;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace Zerolauncher.Manager
|
namespace Zerolauncher.Manager
|
||||||
{
|
{
|
||||||
internal class LoginManager
|
internal class LoginManager
|
||||||
{
|
{
|
||||||
|
|
||||||
//private static readonly HttpClient client = new HttpClient();
|
//private static readonly HttpClient client = new HttpClient();
|
||||||
|
|
||||||
public static async Task SendPostRequest()
|
public static async Task SendPostRequest()
|
||||||
@ -45,138 +44,145 @@ namespace Zerolauncher.Manager
|
|||||||
Console.WriteLine(responseString);
|
Console.WriteLine(responseString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GameTest()
|
public static async Task<string?> AssetNet(HttpClient client, SingleGame game, string url, FormUrlEncodedContent? content =null)
|
||||||
{
|
{
|
||||||
//Account account = new Account
|
try
|
||||||
//{
|
{
|
||||||
// userName = "b1783488228",
|
var response = content != null? await client.PostAsync(url, content): await client.GetAsync(url);
|
||||||
// userPWD = "565656",
|
game.Send($"{StaticHandleS.HintText} response.StatusCode{response.StatusCode}");
|
||||||
// serverId = "179"
|
return await response.Content.ReadAsStringAsync();
|
||||||
//};
|
}
|
||||||
//SingleGame game = new SingleGame(account);
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name},消息:{ex.Message}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task DoLogin(SingleGame game)
|
public static async Task DoLogin(SingleGame game)
|
||||||
{
|
{
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
|
client.DefaultRequestVersion = HttpVersion.Version20;
|
||||||
|
client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrLower;
|
||||||
|
client.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0");
|
||||||
string? need_web = null;
|
string? need_web = null;
|
||||||
client.Timeout = TimeSpan.FromSeconds(3);
|
client.Timeout = TimeSpan.FromSeconds(3);
|
||||||
|
game.Send($"{StaticHandleS.HintText} 尝试登玩家{game.account.nickName}到{ServicesStaticInfo.ServicesName[game.account.providerId]}的{game.account.serverId}服");
|
||||||
switch (game.account.providerId)
|
switch (game.account.providerId)
|
||||||
{
|
{
|
||||||
|
case 3:
|
||||||
case 0:
|
case 0:
|
||||||
game.Send($"{StaticHandleS.HintText} 尝试登玩家{game.account.nickName}到{ServicesStaticInfo.ServicesName[game.account.providerId]}的1服");
|
need_web = $"http://web.4399.com/stat/togame.php?target={(game.account.providerId == 3? "ddts":"ddt")}&server_id=S{game.account.serverId}";
|
||||||
{
|
|
||||||
HttpResponseMessage response;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
response = await client.GetAsync("http://180.97.189.249:2023");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name},消息:{ex.Message}");
|
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
var responseString = await response.Content.ReadAsStringAsync();
|
|
||||||
int count = 0;
|
|
||||||
while (responseString.Contains("adfwkey"))
|
|
||||||
{
|
|
||||||
if (count++ <= 10)
|
|
||||||
{
|
|
||||||
game.Send($"{StaticHandleS.HintText} 网络被服务器拦截多次,请重试或联系管理员");
|
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
var key = responseString.Split("adfwkey=")[1].Split("\"", 2)[0];
|
|
||||||
game.Send($"{StaticHandleS.HintText} 被服务验证拦截-验证码key:{key}");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
response = await client.GetAsync("http://180.97.189.249:2023");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name},消息:{ex.Message}");
|
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
responseString = await response.Content.ReadAsStringAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
var values = new Dictionary<string, string>
|
var values = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{ "lUsername", game.account.userName },
|
{ "loginFrom", "uframe" },
|
||||||
{ "lPassword", game.account.userPWD }
|
{ "postLoginHandler", "default" },
|
||||||
|
{ "layoutSelfAdapting", "true" },
|
||||||
|
{ "externalLogin", "qq" },
|
||||||
|
{ "displayMode", "popup" },
|
||||||
|
{ "layout", "vertical" },
|
||||||
|
{ "appId", "www_home" },
|
||||||
|
{ "mainDivId", "popup_login_div" },
|
||||||
|
{ "includeFcmInfo", "false" },
|
||||||
|
{ "userNameLabel", "4399用户名" },
|
||||||
|
{ "userNameTip", "请输入4399用户名" },
|
||||||
|
{ "welcomeTip", "欢迎回到4399" },
|
||||||
|
{ "username", game.account.userName },
|
||||||
|
{ "password", game.account.userPWD }
|
||||||
};
|
};
|
||||||
var content = new FormUrlEncodedContent(values);
|
var responseString = await AssetNet(client, game, "http://ptlogin.4399.com/ptlogin/login.do?v=1", new FormUrlEncodedContent(values));
|
||||||
|
// eventHandles.__errorCallback('密码错误');
|
||||||
|
if (responseString == null) break;
|
||||||
|
if (responseString.Contains("eventHandles.__errorCallback"))
|
||||||
|
{
|
||||||
|
game.Send($"{StaticHandleS.HintText} 登录异常:{responseString.Split("eventHandles.__errorCallback('")[1].Split("'")[0]}");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!game.Send($"{StaticHandleS.HintText} 登录成功,开始解析iframe")) return;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
var responseString = await AssetNet(client, game, need_web);
|
||||||
|
if (responseString == null) break;
|
||||||
|
if (!responseString.Contains("name=\"game_box\""))
|
||||||
|
{
|
||||||
|
game.Send($"{StaticHandleS.HintText} 解析异常:服务器返回数据不正确");
|
||||||
|
Trace.WriteLine(responseString);
|
||||||
|
if (responseString.Contains("维护")) game.Send($"{StaticHandleS.HintText} 检测到服务器在维护中,请耐心等候官方开服");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
responseString = responseString.Split("name=\"game_box\"")[1].Split("src=\"")[1].Split("\"")[0];
|
||||||
HttpResponseMessage response;
|
HttpResponseMessage response;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
response = await client.PostAsync("http://180.97.189.249:2023/form/login.php", content);
|
response = await client.PostAsync(responseString, null);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name},消息:{ex.Message}");
|
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name.Replace(" ", "_")},消息:{ex.Message.Replace(" ", "_")}");
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var responseString = await response.Content.ReadAsStringAsync();
|
|
||||||
|
responseString = await response.Content.ReadAsStringAsync();
|
||||||
|
if (game.account.providerId == 3)
|
||||||
|
{
|
||||||
|
responseString = responseString.Split("\"movie\" value='")[1].Split("'", 2)[0];
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
responseString = "http://" + response.RequestMessage.RequestUri.ToString().Split("/")[2] + "/" + responseString.Split("movie\" value='")[1].Split("'")[0];
|
||||||
|
}
|
||||||
|
game.Send($"{StaticHandleS.GameSa} {responseString}");
|
||||||
|
}
|
||||||
|
need_web = null ;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
need_web = $"http://web.7k7k.com/games/togame.php?target=ddt_7&server_id={game.account.serverId}";
|
||||||
|
{
|
||||||
|
var values = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "username", game.account.userName },
|
||||||
|
{ "password", game.account.userPWD },
|
||||||
|
{"auto", "1" },
|
||||||
|
{"formtype", "index_log" }
|
||||||
|
};
|
||||||
|
var responseString = await AssetNet(client, game, "https://web.7k7k.com/source/Post.php", new FormUrlEncodedContent(values));
|
||||||
|
if (responseString == null) break;
|
||||||
|
//game.Send($"{StaticHandleS.HintText} {responseString}");
|
||||||
JObject jsonObj = JObject.Parse(responseString);
|
JObject jsonObj = JObject.Parse(responseString);
|
||||||
game.Send($"{StaticHandleS.HintText} {jsonObj["title"]}");
|
game.Send($"{StaticHandleS.HintText} {jsonObj["info"]}");
|
||||||
game.Send($"{StaticHandleS.HintText} {jsonObj["content"]}");
|
if ((int)jsonObj["status"] != 1) break;
|
||||||
if ((int)jsonObj["type"] != 0)
|
if (!game.Send($"{StaticHandleS.HintText} 登录成功,开始解析iframe")) return;
|
||||||
{
|
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(!game.Send($"{StaticHandleS.HintText} 登录成功,开始解析iframe")) return;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
HttpResponseMessage response;
|
HttpResponseMessage response;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
response = await client.GetAsync("http://180.97.189.249:2023/Play/Play.php?id=1");
|
response = await client.GetAsync(need_web);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name},消息:{ex.Message}");
|
game.Send($"{StaticHandleS.HintText} 网络发生错误,类型:{ex.GetType().Name.Replace(" ", "_")},消息:{ex.Message.Replace(" ", "_")}");
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var responseString = await response.Content.ReadAsStringAsync();
|
var responseString = await response.Content.ReadAsStringAsync();
|
||||||
if (!responseString.Contains("var swfPath"))
|
if (!responseString.Contains("movie\" value='"))
|
||||||
{
|
{
|
||||||
game.Send($"{StaticHandleS.HintText} 解析异常:服务器返回数据不正确1");
|
game.Send($"{StaticHandleS.HintText} 解析异常:服务器返回数据不正确");
|
||||||
need_web = $"http://180.97.189.249:2023";
|
if (responseString.Contains("维护")) game.Send($"{StaticHandleS.HintText} 检测到服务器在维护中,请耐心等候官方开服");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//responseString = "" + responseString.Split("var swfPath")[1].Split("};")[0] + "};";
|
responseString = "http://" + response.RequestMessage.RequestUri.ToString().Split("/")[2] + "/" + responseString.Split("movie\" value='")[1].Split("'")[0];
|
||||||
string pattern = @"var swfPath = ""(.*?)"";(.*?){(.*?)};";
|
//Trace.WriteLine(responseString);
|
||||||
Match match = Regex.Match(responseString, pattern, RegexOptions.Singleline);
|
game.Send($"{StaticHandleS.GameSa} {responseString}");
|
||||||
|
|
||||||
if (!match.Success)
|
|
||||||
{
|
|
||||||
game.Send($"{StaticHandleS.HintText} 解析异常:服务器返回数据不正确2");
|
|
||||||
//Trace.WriteLine($"---------{responseString}|");
|
|
||||||
need_web = $"http://180.97.189.249:2023";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
string url = match.Groups[1].Value;
|
|
||||||
string parameters = match.Groups[3].Value;
|
|
||||||
|
|
||||||
string patternParams = @"(\w+): ""(.*?)""";
|
|
||||||
MatchCollection matches = Regex.Matches(parameters, patternParams);
|
|
||||||
|
|
||||||
url += "?";
|
|
||||||
foreach (Match m in matches)
|
|
||||||
{
|
|
||||||
url += $"{m.Groups[1].Value}={WebUtility.UrlEncode(m.Groups[2].Value)}&";
|
|
||||||
}
|
|
||||||
url = url.TrimEnd('&');
|
|
||||||
Trace.WriteLine(url);
|
|
||||||
game.Send($"{StaticHandleS.GameSa} {url}");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
need_web = $"http://www.wan.com/game/play/id/{game.account.serverId}";
|
||||||
|
break;
|
||||||
|
// case 3:
|
||||||
|
//need_web = $"https://web.4399.com/stat/togame.php?target=ddts&server_id=S{game.account.serverId}";
|
||||||
|
// break;
|
||||||
default:
|
default:
|
||||||
game.Send($"{StaticHandleS.HintText} 错误。未适配的运营商:{game.account.serverId}");
|
game.Send($"{StaticHandleS.HintText} 错误。未适配的运营商:{game.account.serverId}");
|
||||||
break;
|
break;
|
||||||
@ -188,7 +194,7 @@ namespace Zerolauncher.Manager
|
|||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
if (!game.Send($"{StaticHandleS.HintText} 自动登录失败,将在{i}后启用网页登录,关闭窗口取消")) { return; }
|
if (!game.Send($"{StaticHandleS.HintText} 自动登录失败,将在{i}后启用网页登录,关闭窗口取消")) { return; }
|
||||||
}
|
}
|
||||||
game.Send($"{StaticHandleS.UseBrowser} {need_web}");
|
game.Send($"{StaticHandleS.UseBrowser} {need_web} {game.account.providerId + 1} {game.account.serverId} {game.account.userName} {game.account.userPWD}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
class ServicesStaticInfo
|
class ServicesStaticInfo
|
||||||
{
|
{
|
||||||
public static string[] ServicesName = ["LoveDDTank"];
|
public static string[] ServicesName = ["4399大区", "7k7k大区", "第七大道", "4399经典"];
|
||||||
public static string[] ServicesShortName = ["经典"];
|
public static string[] ServicesShortName = ["43", "7k", "7d", "典"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
public const string GameSa = "f0";
|
public const string GameSa = "f0";
|
||||||
public const string CloseGame = "g0";
|
public const string CloseGame = "g0";
|
||||||
public const string UpdateInfo = "h0";
|
public const string UpdateInfo = "h0";
|
||||||
|
public const string VerifyDone = "i0";
|
||||||
}
|
}
|
||||||
|
|
||||||
class StaticHandleC
|
class StaticHandleC
|
||||||
@ -21,6 +22,7 @@
|
|||||||
public const string GameDone = "0e";
|
public const string GameDone = "0e";
|
||||||
public const string Version = "0f";
|
public const string Version = "0f";
|
||||||
public const string DownloadDone = "0g";
|
public const string DownloadDone = "0g";
|
||||||
|
public const string TakeVerify = "0i";
|
||||||
}
|
}
|
||||||
|
|
||||||
class StaticHandleA
|
class StaticHandleA
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
</ResourceDictionary>
|
|
||||||
@ -4,11 +4,11 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="75" d:DesignWidth="60" Margin="5">
|
d:DesignHeight="75" d:DesignWidth="65" Margin="5">
|
||||||
<Grid>
|
<Grid>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Image Name="icon" DockPanel.Dock="Top" Source="/res/player_ico1.png" Width="60" Height="60"/>
|
<Image Name="icon" DockPanel.Dock="Top" Source="/res/player_ico1.png" Width="60" Height="60"/>
|
||||||
<Label Name="text" DockPanel.Dock="Bottom" Content="43-测试账号" FontSize="9" Padding="0"/>
|
<Label Name="text" DockPanel.Dock="Bottom" Content="43-测试账号" FontSize="9" Padding="0" Width="65"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -1,167 +0,0 @@
|
|||||||
using System.Globalization;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
using System.Windows.Controls;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 不能为空验证
|
|
||||||
/// </summary>
|
|
||||||
public class NotNullValidationRule : ValidationRule
|
|
||||||
{
|
|
||||||
public NotNullValidationRule()
|
|
||||||
{
|
|
||||||
ValidatesOnTargetUpdated = true;
|
|
||||||
}
|
|
||||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(value as string) || string.IsNullOrWhiteSpace(value as string))
|
|
||||||
{
|
|
||||||
return new ValidationResult(false, "不能为空!");
|
|
||||||
}
|
|
||||||
return ValidationResult.ValidResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自定义正则表达式验证
|
|
||||||
/// </summary>
|
|
||||||
/*
|
|
||||||
一、校验数字的表达式
|
|
||||||
1. 数字:^[0-9]*$
|
|
||||||
2. n位的数字:^\d{n}$
|
|
||||||
3. 至少n位的数字:^\d{n,}$
|
|
||||||
4. m-n位的数字:^\d{m,n}$
|
|
||||||
5. 零和非零开头的数字:^(0|[1-9][0-9]*)$
|
|
||||||
6. 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$
|
|
||||||
7. 带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})?$
|
|
||||||
8. 正数、负数、和小数:^(\-|\+)?\d+(\.\d+)?$
|
|
||||||
9. 有两位小数的正实数:^[0-9]+(.[0-9]{2})?$
|
|
||||||
10. 有1~3位小数的正实数:^[0-9]+(.[0-9]{1,3})?$
|
|
||||||
11. 非零的正整数:^[1-9]\d*$ 或 ^([1-9][0-9]*){1,3}$ 或 ^\+?[1-9][0-9]*$
|
|
||||||
12. 非零的负整数:^\-[1-9][]0-9"*$ 或 ^-[1-9]\d*$
|
|
||||||
13. 非负整数:^\d+$ 或 ^[1-9]\d*|0$
|
|
||||||
14. 非正整数:^-[1-9]\d*|0$ 或 ^((-\d+)|(0+))$
|
|
||||||
15. 非负浮点数:^\d+(\.\d+)?$ 或 ^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$
|
|
||||||
16. 非正浮点数:^((-\d+(\.\d+)?)|(0+(\.0+)?))$ 或 ^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$
|
|
||||||
17. 正浮点数:^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ 或 ^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$
|
|
||||||
18. 负浮点数:^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ 或 ^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$
|
|
||||||
19. 浮点数:^(-?\d+)(\.\d+)?$ 或 ^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$
|
|
||||||
二、校验字符的表达式
|
|
||||||
1. 汉字:^[\u4e00-\u9fa5]{0,}$
|
|
||||||
2. 英文和数字:^[A-Za-z0-9]+$ 或 ^[A-Za-z0-9]{4,40}$
|
|
||||||
3. 长度为3-20的所有字符:^.{3,20}$
|
|
||||||
4. 由26个英文字母组成的字符串:^[A-Za-z]+$
|
|
||||||
5. 由26个大写英文字母组成的字符串:^[A-Z]+$
|
|
||||||
6. 由26个小写英文字母组成的字符串:^[a-z]+$
|
|
||||||
7. 由数字和26个英文字母组成的字符串:^[A-Za-z0-9]+$
|
|
||||||
8. 由数字、26个英文字母或者下划线组成的字符串:^\w+$ 或 ^\w{3,20}$
|
|
||||||
9. 中文、英文、数字包括下划线:^[\u4E00-\u9FA5A-Za-z0-9_]+$
|
|
||||||
10. 中文、英文、数字但不包括下划线等符号:^[\u4E00-\u9FA5A-Za-z0-9]+$ 或 ^[\u4E00-\u9FA5A-Za-z0-9]{2,20}$
|
|
||||||
11. 可以输入含有^%&',;=?$\"等字符:[^%&',;=?$\x22]+ 12 禁止输入含有~的字符:[^~\x22]+
|
|
||||||
三、特殊需求表达式
|
|
||||||
1. Email地址:^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
|
|
||||||
2. 域名:[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(/.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+/.?
|
|
||||||
3. InternetURL:[a-zA-z]+://[^\s]* 或 ^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$
|
|
||||||
4. 手机号码:^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$
|
|
||||||
5. 电话号码("XXX-XXXXXXX"、"XXXX-XXXXXXXX"、"XXX-XXXXXXX"、"XXX-XXXXXXXX"、"XXXXXXX"和"XXXXXXXX):^(\(\d{3,4}-)|\d{3.4}-)?\d{7,8}$
|
|
||||||
6. 国内电话号码(0511-4405222、021-87888822):\d{3}-\d{8}|\d{4}-\d{7}
|
|
||||||
7. 身份证号(15位、18位数字):^\d{15}|\d{18}$
|
|
||||||
8. 短身份证号码(数字、字母x结尾):^([0-9]){7,18}(x|X)?$ 或 ^\d{8,18}|[0-9x]{8,18}|[0-9X]{8,18}?$
|
|
||||||
9. 帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$
|
|
||||||
10. 密码(以字母开头,长度在6~18之间,只能包含字母、数字和下划线):^[a-zA-Z]\w{5,17}$
|
|
||||||
11. 强密码(必须包含大小写字母和数字的组合,不能使用特殊字符,长度在8-10之间):^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$
|
|
||||||
12. 日期格式:^\d{4}-\d{1,2}-\d{1,2}
|
|
||||||
13. 一年的12个月(01~09和1~12):^(0?[1-9]|1[0-2])$
|
|
||||||
14. 一个月的31天(01~09和1~31):^((0?[1-9])|((1|2)[0-9])|30|31)$
|
|
||||||
15. 钱的输入格式:
|
|
||||||
16. 1.有四种钱的表示形式我们可以接受:"10000.00" 和 "10,000.00", 和没有 "分" 的 "10000" 和 "10,000":^[1-9][0-9]*$
|
|
||||||
17. 2.这表示任意一个不以0开头的数字,但是,这也意味着一个字符"0"不通过,所以我们采用下面的形式:^(0|[1-9][0-9]*)$
|
|
||||||
18. 3.一个0或者一个不以0开头的数字.我们还可以允许开头有一个负号:^(0|-?[1-9][0-9]*)$
|
|
||||||
19. 4.这表示一个0或者一个可能为负的开头不为0的数字.让用户以0开头好了.把负号的也去掉,因为钱总不能是负的吧.下面我们要加的是说明可能的小数部分:^[0-9]+(.[0-9]+)?$
|
|
||||||
20. 5.必须说明的是,小数点后面至少应该有1位数,所以"10."是不通过的,但是 "10" 和 "10.2" 是通过的:^[0-9]+(.[0-9]{2})?$
|
|
||||||
21. 6.这样我们规定小数点后面必须有两位,如果你认为太苛刻了,可以这样:^[0-9]+(.[0-9]{1,2})?$
|
|
||||||
22. 7.这样就允许用户只写一位小数.下面我们该考虑数字中的逗号了,我们可以这样:^[0-9]{1,3}(,[0-9]{3})*(.[0-9]{1,2})?$
|
|
||||||
23 8.1到3个数字,后面跟着任意个 逗号+3个数字,逗号成为可选,而不是必须:^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$
|
|
||||||
24. 备注:这就是最终结果了,别忘了"+"可以用"*"替代如果你觉得空字符串也可以接受的话(奇怪,为什么?)最后,别忘了在用函数时去掉去掉那个反斜杠,一般的错误都在这里
|
|
||||||
25. xml文件:^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\.[x|X][m|M][l|L]$
|
|
||||||
26. 中文字符的正则表达式:[\u4e00-\u9fa5]
|
|
||||||
27. 双字节字符:[^\x00-\xff] (包括汉字在内,可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1))
|
|
||||||
28. 空白行的正则表达式:\n\s*\r (可以用来删除空白行)
|
|
||||||
29. HTML标记的正则表达式:<(\S*?)[^>]*>.*?</\1>|<.*? /> (网上流传的版本太糟糕,上面这个也仅仅能部分,对于复杂的嵌套标记依旧无能为力)
|
|
||||||
30. 首尾空白字符的正则表达式:^\s*|\s*$或(^\s*)|(\s*$) (可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式)
|
|
||||||
31. 腾讯QQ号:[1-9][0-9]{4,} (腾讯QQ号从10000开始)
|
|
||||||
32. 中国邮政编码:[1-9]\d{5}(?!\d) (中国邮政编码为6位数字)
|
|
||||||
33. IP地址:\d+\.\d+\.\d+\.\d+ (提取IP地址时有用)
|
|
||||||
34. IP地址:((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))
|
|
||||||
*/
|
|
||||||
public class CustomRegularValidationRule : ValidationRule
|
|
||||||
{
|
|
||||||
public CustomRegularValidationRule()
|
|
||||||
{
|
|
||||||
ValidatesOnTargetUpdated = true;
|
|
||||||
}
|
|
||||||
public string RegularString { get; set; } // 正则表达式规则
|
|
||||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
|
||||||
{
|
|
||||||
string str = value as string;
|
|
||||||
if (!string.IsNullOrWhiteSpace(str))
|
|
||||||
{
|
|
||||||
// 检查输入的字符串是否符合当前正则规范
|
|
||||||
if (!Regex.IsMatch(str, RegularString))
|
|
||||||
{
|
|
||||||
return new ValidationResult(false, "内容格式不正确");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ValidationResult.ValidResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 长度限制
|
|
||||||
/// </summary>
|
|
||||||
class LengthLimitValidationRule : ValidationRule
|
|
||||||
{
|
|
||||||
public LengthLimitValidationRule()
|
|
||||||
{
|
|
||||||
ValidatesOnTargetUpdated = true;
|
|
||||||
}
|
|
||||||
public double Minimum { get; set; }
|
|
||||||
public double Maximum { get; set; }
|
|
||||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
|
||||||
{
|
|
||||||
if (value == null) return ValidationResult.ValidResult;
|
|
||||||
double number = value.ToString().Length;
|
|
||||||
if (number > Maximum || number < Minimum)
|
|
||||||
{
|
|
||||||
return new ValidationResult(false, string.Format("值长度限制在 {0} 到 {1}", Minimum, Maximum));
|
|
||||||
}
|
|
||||||
return ValidationResult.ValidResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ip规则验证
|
|
||||||
/// </summary>
|
|
||||||
public class IPAddressRule : ValidationRule
|
|
||||||
{
|
|
||||||
public IPAddressRule()
|
|
||||||
{
|
|
||||||
ValidatesOnTargetUpdated = true;
|
|
||||||
}
|
|
||||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
|
|
||||||
{
|
|
||||||
string IPAddress = value as string;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(IPAddress))
|
|
||||||
{
|
|
||||||
string IPAddressFormartRegex = @"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$";
|
|
||||||
|
|
||||||
// 检查输入的字符串是否符合IP地址格式
|
|
||||||
if (!Regex.IsMatch(IPAddress, IPAddressFormartRegex))
|
|
||||||
{
|
|
||||||
return new ValidationResult(false, "IP地址格式不正确");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ValidationResult.ValidResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -33,7 +33,7 @@ namespace Zerolauncher.dialog
|
|||||||
edit_pwd.Password = acc.userPWD;
|
edit_pwd.Password = acc.userPWD;
|
||||||
edit_nick.Text = acc.nickName;
|
edit_nick.Text = acc.nickName;
|
||||||
}
|
}
|
||||||
//return;
|
return;
|
||||||
// 私服用
|
// 私服用
|
||||||
if (ServicesStaticInfo.ServicesName.Length == 1)
|
if (ServicesStaticInfo.ServicesName.Length == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TextBox.Style>
|
</TextBox.Style>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<DockPanel Grid.Row="5" Margin="2">
|
<DockPanel Margin="7">
|
||||||
<Button DockPanel.Dock="Right" Background="Transparent" Click="Button_Click" BorderBrush="Transparent">
|
<Button DockPanel.Dock="Right" Background="Transparent" Click="Button_Click" BorderBrush="Transparent">
|
||||||
<Image Source="/res/25.png"/>
|
<Image Source="/res/25.png"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -34,10 +34,8 @@ namespace Zerolauncher.dialog
|
|||||||
MessageBoxResult result = MessageBox.Show("即将放生此队伍以及队伍里所有的账号\n将会为你带来114点功德\n您确定要执行此操作吗?", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Warning, MessageBoxResult.Cancel);
|
MessageBoxResult result = MessageBox.Show("即将放生此队伍以及队伍里所有的账号\n将会为你带来114点功德\n您确定要执行此操作吗?", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Warning, MessageBoxResult.Cancel);
|
||||||
if (result == MessageBoxResult.OK)
|
if (result == MessageBoxResult.OK)
|
||||||
{
|
{
|
||||||
if (!AccountManager.DeleteTeam())
|
if (!AccountManager.DeleteTeam()) MessageBox.Show("少爷这已经是最后一个队伍了!\n请新建一个队伍后再放生这个吧~", "提示");
|
||||||
{
|
else EditTeamDialog.Close();
|
||||||
MessageBox.Show("少爷这已经是最后一个队伍了!\n请新建一个队伍后再放生这个吧~", "提示");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="169" d:DesignWidth="290">
|
d:DesignHeight="169" d:DesignWidth="290">
|
||||||
<DockPanel Margin="5">
|
<DockPanel Margin="5">
|
||||||
<TextBlock DockPanel.Dock="Top" Margin="5" Text="文本格式:一行一个账号,如:
 服务器---区号---账号---密码---备注
服务器填代号:
 4399是0,7k7k是1,第七大道是2" Foreground="#FFB44242"/>
|
<TextBlock DockPanel.Dock="Top" Margin="5" Text="文本格式:一行一个账号,如:
 服务器---区号---账号---密码---备注
服务器填代号:
 如[0, 4399大区]意味着4399大区的代号是0,
 具体查看添加账号时,以列表显示的为准" Foreground="#FFB44242"/>
|
||||||
<DockPanel DockPanel.Dock="Bottom">
|
<DockPanel DockPanel.Dock="Bottom">
|
||||||
<Button DockPanel.Dock="Right" Content="选择文件" Click="Button_Click"/>
|
<Button DockPanel.Dock="Right" Content="选择文件" Click="Button_Click"/>
|
||||||
<TextBox Name="input_split" DockPanel.Dock="Right" Text="---" Width="100"/>
|
<TextBox Name="input_split" DockPanel.Dock="Right" Text="---" Width="100"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user