mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2024-11-24 08:08:14 +11:00
main: Added DNS batching
This commit is contained in:
parent
2f7427d5b4
commit
890da5d64d
@ -633,6 +633,8 @@ namespace FireWallet
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
AddLog("Post Error: " + ex.Message);
|
AddLog("Post Error: " + ex.Message);
|
||||||
|
AddLog(await resp.Content.ReadAsStringAsync());
|
||||||
|
AddLog(content);
|
||||||
return "Error";
|
return "Error";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -694,7 +696,7 @@ namespace FireWallet
|
|||||||
else if (method == "UPDATE" && update != null)
|
else if (method == "UPDATE" && update != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
string records = "{records:[" + string.Join(", ", update.Select(record => record.ToString())) + "]}";
|
string records = "{\"records\":[" + string.Join(", ", update.Select(record => record.ToString())) + "]}";
|
||||||
return "[\"UPDATE\", \"" + domain + "\", " + records + "]";
|
return "[\"UPDATE\", \"" + domain + "\", " + records + "]";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
1
FireWallet/DNSForm.Designer.cs
generated
1
FireWallet/DNSForm.Designer.cs
generated
@ -170,6 +170,7 @@
|
|||||||
comboBoxType.Size = new Size(129, 23);
|
comboBoxType.Size = new Size(129, 23);
|
||||||
comboBoxType.TabIndex = 3;
|
comboBoxType.TabIndex = 3;
|
||||||
comboBoxType.SelectedIndexChanged += comboBoxType_SelectedIndexChanged;
|
comboBoxType.SelectedIndexChanged += comboBoxType_SelectedIndexChanged;
|
||||||
|
comboBoxType.DropDownClosed += comboBoxType_DropDownClosed;
|
||||||
//
|
//
|
||||||
// DNSForm
|
// DNSForm
|
||||||
//
|
//
|
||||||
|
@ -37,6 +37,7 @@ namespace FireWallet
|
|||||||
GetDNS();
|
GetDNS();
|
||||||
|
|
||||||
comboBoxType.SelectedIndex = 0;
|
comboBoxType.SelectedIndex = 0;
|
||||||
|
textBoxMain.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -613,5 +614,10 @@ namespace FireWallet
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void comboBoxType_DropDownClosed(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
textBoxMain.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -877,7 +877,6 @@ namespace FireWallet
|
|||||||
string records = string.Join(", ", DNSEdit.DNSrecords.Select(record => record.ToString()));
|
string records = string.Join(", ", DNSEdit.DNSrecords.Select(record => record.ToString()));
|
||||||
|
|
||||||
string content = "{\"method\": \"sendupdate\", \"params\": [\"" + domain + "\", {\"records\": [" + records + "]}]}";
|
string content = "{\"method\": \"sendupdate\", \"params\": [\"" + domain + "\", {\"records\": [" + records + "]}]}";
|
||||||
AddLog(content);
|
|
||||||
string response = await APIPost("", true, content);
|
string response = await APIPost("", true, content);
|
||||||
|
|
||||||
if (response == "Error")
|
if (response == "Error")
|
||||||
@ -975,6 +974,7 @@ namespace FireWallet
|
|||||||
if (!dnsEdit.cancel)
|
if (!dnsEdit.cancel)
|
||||||
{
|
{
|
||||||
mainForm.AddBatch(domain, "UPDATE", dnsEdit.DNSrecords);
|
mainForm.AddBatch(domain, "UPDATE", dnsEdit.DNSrecords);
|
||||||
|
this.Close();
|
||||||
}
|
}
|
||||||
dnsEdit.Dispose();
|
dnsEdit.Dispose();
|
||||||
}
|
}
|
||||||
|
3
FireWallet/MainForm.Designer.cs
generated
3
FireWallet/MainForm.Designer.cs
generated
@ -115,6 +115,7 @@ namespace FireWallet
|
|||||||
//
|
//
|
||||||
// toolStripStatusLabelNetwork
|
// toolStripStatusLabelNetwork
|
||||||
//
|
//
|
||||||
|
toolStripStatusLabelNetwork.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||||
toolStripStatusLabelNetwork.Margin = new Padding(0, 3, 50, 2);
|
toolStripStatusLabelNetwork.Margin = new Padding(0, 3, 50, 2);
|
||||||
toolStripStatusLabelNetwork.Name = "toolStripStatusLabelNetwork";
|
toolStripStatusLabelNetwork.Name = "toolStripStatusLabelNetwork";
|
||||||
toolStripStatusLabelNetwork.Size = new Size(58, 17);
|
toolStripStatusLabelNetwork.Size = new Size(58, 17);
|
||||||
@ -122,6 +123,7 @@ namespace FireWallet
|
|||||||
//
|
//
|
||||||
// toolStripStatusLabelstatus
|
// toolStripStatusLabelstatus
|
||||||
//
|
//
|
||||||
|
toolStripStatusLabelstatus.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||||
toolStripStatusLabelstatus.Margin = new Padding(0, 3, 50, 2);
|
toolStripStatusLabelstatus.Margin = new Padding(0, 3, 50, 2);
|
||||||
toolStripStatusLabelstatus.Name = "toolStripStatusLabelstatus";
|
toolStripStatusLabelstatus.Name = "toolStripStatusLabelstatus";
|
||||||
toolStripStatusLabelstatus.Size = new Size(126, 17);
|
toolStripStatusLabelstatus.Size = new Size(126, 17);
|
||||||
@ -129,6 +131,7 @@ namespace FireWallet
|
|||||||
//
|
//
|
||||||
// toolStripStatusLabelaccount
|
// toolStripStatusLabelaccount
|
||||||
//
|
//
|
||||||
|
toolStripStatusLabelaccount.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||||
toolStripStatusLabelaccount.Margin = new Padding(0, 3, 50, 2);
|
toolStripStatusLabelaccount.Margin = new Padding(0, 3, 50, 2);
|
||||||
toolStripStatusLabelaccount.Name = "toolStripStatusLabelaccount";
|
toolStripStatusLabelaccount.Name = "toolStripStatusLabelaccount";
|
||||||
toolStripStatusLabelaccount.Size = new Size(55, 17);
|
toolStripStatusLabelaccount.Size = new Size(55, 17);
|
||||||
|
Loading…
Reference in New Issue
Block a user