Hi guys,
I need your urgently help. I have extract each strings from mystrings to input them in the listview. Now I want to know how i can tick the checkboxes for each array in the listview when i'm checking for each "enabled" strings in the php source on each line?
Here's the code:
Code:
System::Void Form1::timer1_Tick(System::Object^ sender, System::EventArgs^ e)
{
timer1->Enabled = false;
timer1::Stop();
try
{
String ^URL1 = "http://www.mysite.com/myscript.php?user=test&pass=test";
HttpWebRequest ^request1 = safe_cast<HttpWebRequest^>(WebRequest::Create(URL1));
HttpWebResponse ^response1 = safe_cast<HttpWebResponse^>(request1->GetResponse());
StreamReader ^reader1 = gcnew StreamReader(response1->GetResponseStream());
String ^str1 = reader1->ReadToEnd();
String ^pattern1 = "(<p id='mystrings1'>(.*?)</p>(.*?)<span id=\"mystrings2\">Enabled</td>)";
MatchCollection ^matches1 = Regex::Matches(str1, pattern1);
for each (Match ^x1 in matches1)
{
array<String^> ^StrArr1 = x1->Value->ToString()->Split();
Listview1::Items->Add(x1->ToString());
}
}
catch (Exception ^ex)
{
}
}
If you do know how to do this, I will be very grateful.
Thanks,
Mark