#pragma endregion
private: System::Collections::IEnumerator^ my_links_images;
private: System::Collections::IEnumerator^ my_links;
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Close();
}
private: System::Void textBox1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) {
String^ textAdress;
String^ adress;
if(e->KeyData==System::Windows::Forms::Keys::Enter)
{
textAdress=textBox1->Text;
adress="http://"+textAdress;
webBrowser1->Navigate(adress);
}
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
webBrowser1->GoForward();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
webBrowser1->GoBack();
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
my_links_images=webBrowser1->Document->Images->GetEnumerator();
my_links=webBrowser1->Document->Links->GetEnumerator();
my_links_images->MoveNext();
do
{
listBox1->Items->Add(((HtmlElement^)(my_links_images->Current))->GetAttribute("SRC")->ToString());
}
while((my_links_images->MoveNext())&&(my_links_images!=nullptr));
my_links->MoveNext();
do
{
listBox2->Items->Add(((HtmlElement^)(my_links->Current))->GetAttribute("href")->ToString());
}while((my_links->MoveNext())&&(my_links!=nullptr));
}
};
}