main: Added DNS records to domain form

This commit is contained in:
Nathan Woodburn 2023-07-07 15:25:35 +10:00
parent d6462051c2
commit 55da4f4fc1
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 31 additions and 6 deletions

View File

@ -39,8 +39,11 @@
textBoxTransferAddress = new TextBox();
buttonCancel = new Button();
buttonFinalize = new Button();
groupBoxDNS = new GroupBox();
panelDNS = new Panel();
groupBoxInfo.SuspendLayout();
groupBoxManage.SuspendLayout();
groupBoxDNS.SuspendLayout();
SuspendLayout();
//
// groupBoxInfo
@ -157,11 +160,31 @@
buttonFinalize.Visible = false;
buttonFinalize.Click += buttonFinalize_Click;
//
// groupBoxDNS
//
groupBoxDNS.Controls.Add(panelDNS);
groupBoxDNS.Location = new Point(12, 221);
groupBoxDNS.Name = "groupBoxDNS";
groupBoxDNS.Size = new Size(756, 224);
groupBoxDNS.TabIndex = 3;
groupBoxDNS.TabStop = false;
groupBoxDNS.Text = "DNS";
//
// panelDNS
//
panelDNS.AutoSize = true;
panelDNS.Dock = DockStyle.Fill;
panelDNS.Location = new Point(3, 19);
panelDNS.Name = "panelDNS";
panelDNS.Size = new Size(750, 202);
panelDNS.TabIndex = 0;
//
// DomainForm
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(780, 457);
Controls.Add(groupBoxDNS);
Controls.Add(groupBoxManage);
Controls.Add(buttonExplorer);
Controls.Add(labelName);
@ -178,6 +201,8 @@
groupBoxInfo.PerformLayout();
groupBoxManage.ResumeLayout(false);
groupBoxManage.PerformLayout();
groupBoxDNS.ResumeLayout(false);
groupBoxDNS.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
@ -194,5 +219,7 @@
private TextBox textBoxTransferAddress;
private Button buttonFinalize;
private Button buttonCancel;
private GroupBox groupBoxDNS;
private Panel panelDNS;
}
}

View File

@ -53,7 +53,6 @@ namespace FireWalletLite
labelInfo.Text = "";
if (jObject.ContainsKey("result"))
{
main.AddLog(jObject.ToString());
JObject result = (JObject)jObject["result"];
JObject start = (JObject)result["start"];
if (start["reserved"].ToString().ToLower() == "true") labelInfo.Text = "Reserved for ICANN domain owner\n";
@ -91,7 +90,7 @@ namespace FireWalletLite
// Get DNS if the domain isn't in auction
//if (state == "CLOSED") GetDNS();
if (state == "CLOSED") GetDNS();
}
@ -288,13 +287,13 @@ namespace FireWalletLite
}
}
/*
// Get DNS records for domain. Not implemented yet
private async void GetDNS()
{
// Get DNS records
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
string responseDNS = await APIPost("", false, contentDNS);
string responseDNS = await main.APIPost("", false, contentDNS);
JObject jObjectDNS = JObject.Parse(responseDNS);
if (jObjectDNS["result"].ToString() == "")
@ -388,7 +387,6 @@ namespace FireWalletLite
panelDNS.Controls.Add(DNSPanel);
i++;
}
panelDNS.AutoScroll = true;
}*/
}
}
}