public void WebpageAnalyzationMain(string filename)
        {
            SavingAndReading data = new SavingAndReading();

            string             url = System.IO.File.ReadAllText(filename);
            WebpageAnalyzation web = new WebpageAnalyzation();

            HtmlDocument doc = web.DepartmentNodeCollection(url);

            web.timePX(doc);
            web.Subject(doc);
            web.CountSubjectInEachDay(doc);
            web.CompeletTT(doc);
            web.print();

            data.WriteSystemList();
        }
        //SerializeObjects newSerializeObjects = new SerializeObjects();
        //
        public webpageAnalyzation()
        {
            //SavingList newSavingList = new SavingList();
            InitializeComponent();
            this.CenterToScreen();
            string             url = System.IO.File.ReadAllText("C:/Users/GaoZh/Desktop/individual project/timetable system/webpage analyzation/Computing UG4.html");
            WebpageAnalyzation web = new WebpageAnalyzation();

            //HtmlAgilityPack.HtmlDocument doc = web.DepartmentNodeCollection(url);

            //web.timePX(doc);
            //web.Subject(doc);
            //web.CountSubjectInEachDay(doc);
            //web.CompeletTT(doc);

            //web.print();

            //MondayNine.Text = web.TimetableContainer[0].SubjectFullName;

            //button1_Click.Click = button1_Click + 1;
            // public static object SerializeObjects newSerializeObjects = new SerializeObjects();
        }
        private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "Cursor Files|*.html";
            openFileDialog.Title  = "Select a Cursor File";

            if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //this.Cursor = new Cursor(openFileDialog.OpenFile());
                var fileName           = openFileDialog.FileName;
                WebpageAnalyzation web = new WebpageAnalyzation();
                web.WebpageAnalyzationMain(fileName);

                //seperate details to rooms
                Room newRoom = new Room();
                newRoom.collectTTTInfo(newRoom);


                MessageBox.Show("Finished Analyzation!");
            }
        }