1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-26 07:06:08 +03:00

修复安装MTProto下载脚本错误3

This commit is contained in:
ProxySU 2020-11-02 09:45:49 +08:00
parent 8f83b57dd4
commit e93abb5a1d
2 changed files with 24 additions and 25 deletions

View File

@ -604,31 +604,8 @@ namespace ProxySU
string configSavePath = configDomainSavePath; string configSavePath = configDomainSavePath;
RadioButtonMtgIpv4.IsChecked = true; RadioButtonMtgIpv4.IsChecked = true;
//MessageBox.Show(MainWindow.ReceiveConfigurationParameters[9]);
JObject jObjectJson = JObject.Parse(MainWindow.ReceiveConfigurationParameters[9]);
//MessageBox.Show(jObjectJson.ToString());
if (jObjectJson["ipv4"]["tg_url"].ToString().Contains("nil") == false)
{
RadioButtonMtgIpv4.Visibility = Visibility.Visible;
TextBoxURLMtgTgIpv4.Text = jObjectJson["ipv4"]["tg_url"].ToString();
ImageShareQRcodeMtgTgIpv4.Source = CreateQRCode(TextBoxURLMtgTgIpv4.Text, $"{configSavePath}\\QRIpv4Tg.bmp");
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\urlIpv4Tg.txt"))
{
sw.WriteLine(TextBoxURLMtgTgIpv4.Text);
}
TextBoxURLMtgTmeIpv4.Text = jObjectJson["ipv4"]["tme_url"].ToString(); JObject jObjectJson = JObject.Parse(MainWindow.ReceiveConfigurationParameters[9]);
ImageShareQRcodeMtgTmeIpv4.Source = CreateQRCode(TextBoxURLMtgTmeIpv4.Text, $"{configSavePath}\\QRIpv4Tme.bmp");
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\urlIpv4Tme.txt"))
{
sw.WriteLine(TextBoxURLMtgTmeIpv4.Text);
}
RadioButtonMtgIpv4.IsChecked = true;
}
else
{
RadioButtonMtgIpv4.Visibility = Visibility.Collapsed;
}
if (jObjectJson["ipv6"]["tg_url"].ToString().Contains("nil") == false) if (jObjectJson["ipv6"]["tg_url"].ToString().Contains("nil") == false)
{ {
@ -653,6 +630,28 @@ namespace ProxySU
RadioButtonMtgIpv6.Visibility = Visibility.Collapsed; RadioButtonMtgIpv6.Visibility = Visibility.Collapsed;
} }
if (jObjectJson["ipv4"]["tg_url"].ToString().Contains("nil") == false)
{
RadioButtonMtgIpv4.Visibility = Visibility.Visible;
TextBoxURLMtgTgIpv4.Text = jObjectJson["ipv4"]["tg_url"].ToString();
ImageShareQRcodeMtgTgIpv4.Source = CreateQRCode(TextBoxURLMtgTgIpv4.Text, $"{configSavePath}\\QRIpv4Tg.bmp");
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\urlIpv4Tg.txt"))
{
sw.WriteLine(TextBoxURLMtgTgIpv4.Text);
}
TextBoxURLMtgTmeIpv4.Text = jObjectJson["ipv4"]["tme_url"].ToString();
ImageShareQRcodeMtgTmeIpv4.Source = CreateQRCode(TextBoxURLMtgTmeIpv4.Text, $"{configSavePath}\\QRIpv4Tme.bmp");
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\urlIpv4Tme.txt"))
{
sw.WriteLine(TextBoxURLMtgTmeIpv4.Text);
}
RadioButtonMtgIpv4.IsChecked = true;
}
else
{
RadioButtonMtgIpv4.Visibility = Visibility.Collapsed;
}
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\mtproto_info.json")) using (StreamWriter sw = new StreamWriter($"{configSavePath}\\mtproto_info.json"))
{ {

Binary file not shown.