예제 #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();
 }
예제 #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
            }
        }
예제 #3
0
        DataGridView hgrid; //grid for the history

        #endregion Fields

        #region Constructors

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