Decompile and Rebuild v0.1.2
begin work: base version 0993 move original program for orgnization golang work snapshot decompiled code it builds! (but doesnt run) source code bump library stash decompile 0.1.2, make it build
This commit is contained in:
commit
3e31aa0363
45 changed files with 7996 additions and 0 deletions
84
ControlApp/ComForm.cs
Normal file
84
ControlApp/ComForm.cs
Normal file
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using HtmlAgilityPack;
|
||||
|
||||
namespace ControlApp;
|
||||
|
||||
public class ComForm : Form
|
||||
{
|
||||
private string formtype;
|
||||
|
||||
private IContainer components;
|
||||
|
||||
public string[] ReturnedData { get; private set; }
|
||||
|
||||
public ComForm(string Url, string type)
|
||||
{
|
||||
formtype = type;
|
||||
ReturnedData = new string[3] { "", "", "" };
|
||||
WebBrowser wb = new WebBrowser();
|
||||
wb.Name = "TheWebBrowser";
|
||||
wb.Navigate(Url);
|
||||
wb.Dock = DockStyle.Fill;
|
||||
wb.DocumentCompleted += TheWebBrowser_DocumentCompleted;
|
||||
base.Controls.Add(wb);
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ComForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void TheWebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
|
||||
{
|
||||
if (base.Controls["TheWebBrowser"] != null)
|
||||
{
|
||||
string htmlContent = ((WebBrowser)base.Controls["TheWebBrowser"]).DocumentText;
|
||||
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
|
||||
doc.LoadHtml(htmlContent);
|
||||
HtmlNode labelNode = doc.GetElementbyId("result");
|
||||
if (labelNode != null)
|
||||
{
|
||||
ReturnedData[0] = labelNode.InnerText;
|
||||
}
|
||||
if (formtype == "CheckNext")
|
||||
{
|
||||
labelNode = doc.GetElementbyId("next");
|
||||
if (labelNode != null)
|
||||
{
|
||||
ReturnedData[1] = labelNode.InnerText;
|
||||
}
|
||||
labelNode = doc.GetElementbyId("vari");
|
||||
if (labelNode != null)
|
||||
{
|
||||
ReturnedData[2] = labelNode.InnerText;
|
||||
}
|
||||
}
|
||||
}
|
||||
Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
base.SuspendLayout();
|
||||
base.AutoScaleDimensions = new System.Drawing.SizeF(7f, 15f);
|
||||
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
base.ClientSize = new System.Drawing.Size(800, 450);
|
||||
base.Name = "ComForm";
|
||||
base.Opacity = 0.0;
|
||||
this.Text = "ComForm";
|
||||
base.Load += new System.EventHandler(ComForm_Load);
|
||||
base.ResumeLayout(false);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue