Example #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //go get about....
            string jsonAbout = rj.getJSON("/about/");

            //have to turn the string jsonAbout into an object
            //About object...
            about = JToken.Parse(jsonAbout).ToObject <About>();
            Console.WriteLine(about);
            aboutDescription.Text = about.description;
            quote.Text            = about.quote;
            Author.Text           = about.quoteAuthor;


            //get Resources
            string jsonResources = rj.getJSON("/resources/");

            resources = JToken.Parse(jsonResources).ToObject <Resources>();
            Console.WriteLine(resources);

            // get degrees
            string jsonDegree = rj.getJSON("/degrees/");

            // Console.WriteLine(jsonDegree);
            degrees = JToken.Parse(jsonDegree).ToObject <Degrees>();

            //get Minors
            string jsonMinor = rj.getJSON("/minors/");

            minors = JToken.Parse(jsonMinor).ToObject <Minors>();

            //Research
            string jsonResearch = rj.getJSON("/research/");

            research = JToken.Parse(jsonResearch).ToObject <Research>();



            //throw the link into the linkLabel
            linkLabel1.Text = resources.coopEnrollment.RITJobZoneGuidelink;
            linkLabel2.Text = resources.studentAmbassadors.applicationFormLink;
        }
Example #2
0
        /**
         * Minors tab.
         **/
        public void Minors()
        {
            // Get Minors from the API
            string jsonMinors = getRESTData("/minors/");
            Minors minors     = JToken.Parse(jsonMinors).ToObject <Minors>();

            foreach (UgMinor minor in minors.UgMinors)
            {
                rtbMinors.Text += minor.title + " - " + minor.name + Environment.NewLine;
                rtbMinors.Text += minor.description + Environment.NewLine;
                rtbMinors.Text += "Courses:" + Environment.NewLine;
                foreach (String cour in minor.courses)
                {
                    rtbMinors.Text += cour + ", ";
                }
                rtbMinors.Text += "Note:" + Environment.NewLine;
                rtbMinors.Text += minor.note + Environment.NewLine;
                rtbMinors.Text += Environment.NewLine;
            }
        }