1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| wb.Navigate("http://www.innovation.ch/java/java_compile.html");
private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (wb.DocumentText.Contains("<td>Source file 1:</td>"))
{
Log("Initialisation de la compilation ...");
Compilation(wb, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\test.java");
}
}
private void Compilation(WebBrowser selectedWebBrowser, string path)
{
selectedWebBrowser.Document.GetElementById("srcfile").SetAttribute("value", path); // Je sais ps si ça marche :s
//selectedWebBrowser.Document.GetElementById("chAgreeWithTerms").SetAttribute("checked", "checked"); // Option à cocher ou quoi
//HtmlElement elements = selectedWebBrowser.
//foreach (HtmlElement element in elements)
//{
// if (elements.InnerHtml.Contains("Compile"))
// {
// elements.InvokeMember("click");
// MessageBox.Show("dd");
// }
//}
MessageBox.Show("dddd");
Log("Compilation test.java ...");
} |