Example #1
0
        // Once the button is clicked it calls the Show() method to make an instance of
        // the MinorDialog class with the information loaded in from the API
        private void netsysBtn_Click(object sender, EventArgs e)
        {
            string jsonNET = getRESTData("/minors/UgMinors/name=NETSYS-MN");

            Minor net = JToken.Parse(jsonNET).ToObject <Minor>();

            MinorDialog popup = new MinorDialog();

            popup.Show(net.title, net.title, net.description, net.courses);
        }
Example #2
0
        // Once the button is clicked it calls the Show() method to make an instance of
        // the MinorDialog class with the information loaded in from the API
        private void mdevBtn_Click(object sender, EventArgs e)
        {
            string jsonMDEV = getRESTData("/minors/UgMinors/name=MDEV-MN");

            Minor mdev = JToken.Parse(jsonMDEV).ToObject <Minor>();

            MinorDialog popup = new MinorDialog();

            popup.Show(mdev.title, mdev.title, mdev.description, mdev.courses);
        }
Example #3
0
        // Once the button is clicked it calls the Show() method to make an instance of
        // the MinorDialog class with the information loaded in from the API
        private void medBtn_Click(object sender, EventArgs e)
        {
            string jsonMED = getRESTData("/minors/UgMinors/name=MEDINFO-MN");

            Minor med = JToken.Parse(jsonMED).ToObject <Minor>();

            MinorDialog popup = new MinorDialog();

            popup.Show(med.title, med.title, med.description, med.courses);
        }
Example #4
0
        // Once the button is clicked it calls the Show() method to make an instance of
        // the MinorDialog class with the information loaded in from the API
        private void gisBtn_Click(object sender, EventArgs e)
        {
            string jsonGIS = getRESTData("/minors/UgMinors/name=GIS-MN");

            Minor gis = JToken.Parse(jsonGIS).ToObject <Minor>();

            MinorDialog popup = new MinorDialog();

            popup.Show(gis.title, gis.title, gis.description, gis.courses);
        }
Example #5
0
        // Once the button is clicked it calls the Show() method to make an instance of
        // the MinorDialog class with the information loaded in from the API
        private void dbBtn_Click(object sender, EventArgs e)
        {
            string jsonDB = getRESTData("/minors/UgMinors/name=DBDDI-MN");

            Minor db = JToken.Parse(jsonDB).ToObject <Minor>();

            MinorDialog popup = new MinorDialog();

            popup.Show(db.title, db.title, db.description, db.courses);
        }
Example #6
0
        // Upon entering the minors tab the buttons names are populated by the API
        // Note: The & character does not display in the window when loaded in, so I typed in the names that have that manually
        private void minorsTab_Enter(object sender, EventArgs e)
        {
            string jsonDB = getRESTData("/minors/UgMinors/name=DBDDI-MN");

            Minor db = JToken.Parse(jsonDB).ToObject <Minor>();

            dbBtn.Text = db.title;

            string jsonGIS = getRESTData("/minors/UgMinors/name=GIS-MN");

            Minor gis = JToken.Parse(jsonGIS).ToObject <Minor>();

            gisBtn.Text = gis.title;

            string jsonMED = getRESTData("/minors/UgMinors/name=MEDINFO-MN");

            Minor med = JToken.Parse(jsonMED).ToObject <Minor>();

            medBtn.Text = med.title;

            string jsonMDEV = getRESTData("/minors/UgMinors/name=MDEV-MN");

            Minor mdev = JToken.Parse(jsonMDEV).ToObject <Minor>();

            mdevBtn.Text = mdev.title;

            string jsonNET = getRESTData("/minors/UgMinors/name=NETSYS-MN");

            Minor net = JToken.Parse(jsonNET).ToObject <Minor>();

            netsysBtn.Text = net.title;

            string jsonWEBD = getRESTData("/minors/UgMinors/name=MDEV-MN");

            Minor webd = JToken.Parse(jsonWEBD).ToObject <Minor>();

            webdBtn.Text = webd.title;
        }