I'm trying to develop a web browser with multible "tabs". I did not insert a tabcontrol yet, I'm adding the classes to an ArrayList called "Tabs".
So here's the basic layout:
Code: Select all
public abstract class CAbsBrowse
{
protected string sAddress;
protected bool useIP = false;
}
Code: Select all
public class CBrowser : CAbsBrowse
{
WebBrowser myBrowser;
CNavigation Navigation = new CNavigation();
public CBrowser()
{
myBrowser = new WebBrowser();
}
public void Browse(string sAddy)
{
if (UsingIP)
{
myBrowser.Navigate(Navigation.NavigateViaIP(sAddy));
}
else
{
myBrowser.Navigate(Navigation.NavigateNormally(sAddy));
}
}
public string Address
{
get
{
return sAddress;
}
set
{
sAddress = value;
}
}
public bool UsingIP
{
get
{
return useIP;
}
set
{
useIP = value;
}
}
Now that you have a rough idea of it, this is what I want to do in my main form:
Code: Select all
//First browser window
CBrowser Browse = new CBrowser;
Tabs.Add(Browser); //Tabs is an ArrayList
What if I want to know the Navigation address of the Browser object at index 3 of Tabs? How would I do that?
I've tried this:
Code: Select all
(CBrowser) Tabs[0].Address.........
Any help is appreciated.