Exemplo n.º 1
0
 static void Main(String[] args)
 {
     //Create handler
     DataHandler handler = new DataHandler();
     //Create thread and launch the browser on it
     var thread = new Thread(() =>
     {
         Thread.CurrentThread.Name = "Main";
         Application.Run(new PodgeBrowser(handler));
     });
     thread.SetApartmentState(ApartmentState.STA);
     thread.Start();
 }
Exemplo n.º 2
0
        ArrayList webpages = new ArrayList(); //list of webbrowsers

        #endregion Fields

        #region Constructors

        //Constructor
        public PodgeBrowser(DataHandler handler)
        {
            try
            {
                InitializeComponent();
                //on loading the browser, load the homepage, history and bookmarks
                this.handler = handler;
                //create the grid builder
                grid = new GridBuilder(handler);
                //get the homepage
                requested = handler.getHome(); //if first use sets as hw.ac.uk
                //request and display the homepage
                MakeInitialRequest(requested);
            }
            catch (NullReferenceException)
            {
                //do nothing, we don't expect to come here
            }
        }
Exemplo n.º 3
0
        DataGridView hgrid; //grid for the history

        #endregion Fields

        #region Constructors

        public GridBuilder(DataHandler handler)
        {
            this.handler = handler;
        }