protected override void fillInForm(Object element)
        {
            query = (SearchQuery)element;

            movies = query.getList().ToArray();
            chart.Series["Series1"].Points.Clear();
            //coords = new scatterplot[movies.Length];

            for (int i = 0; i < movies.Length; i++)
            {
                if (movies[i].rating != 0)
                {
                    chart.Series["Series1"].Points.AddXY((double)movies[i].year, (double)movies[i].rating);
                }
                else
                {
                    // Clicking doesn't seem to work on 0
                    chart.Series["Series1"].Points.AddXY((double)movies[i].year, (double)movies[i].rating + 0.2);
                }

                //coords[i].ratingY = movies[i].rating;
            }

            defaultColor = chart.Series["Series1"].Points[0].Color;

            //chart.Series["Series1"].Points.DataBindXY();
        }
        protected override void fillInForm(Object element)
        {
            query = (SearchQuery)element;

            lblNumber.Text = query.getList().Count + " movies found.";

            dataGridView.DataSource = query.getList();
        }
 private void search()
 {
     if (searchBox.Text.Length > 0)
     {
         //search
         SearchQuery query = new SearchQuery(searchBox.Text);
         ApplicationManager.changeForm("RESULTS", query);
     }
     else
     {
         ApplicationManager.changeForm("SEARCH", null);
     }
 }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            SearchQuery query = new SearchQuery();

            query.title = txtTitle.Text.Trim();

            query.action = chkAction.Checked;
            query.comedy = chkComedy.Checked;
            query.family = chkFamily.Checked;
            query.history = chkHistory.Checked;
            query.mystery = chkMystery.Checked;
            query.scifi = chkSciFi.Checked;
            query.war = chkWar.Checked;
            query.adventure = chkAdventure.Checked;
            query.crime = chkCrime.Checked;
            query.fantasy = chkFantasy.Checked;
            query.horror = chkHorror.Checked;
            query.news = chkNews.Checked;
            query.sport = chkSport.Checked;
            query.western = chkWestern.Checked;
            query.animation = chkAnimation.Checked;
            query.documentary = chkDocumentary.Checked;
            query.filmnoir = chkFilmNoir.Checked;
            query.music = chkMusic.Checked;
            query.realitytv = chkRealityTV.Checked;
            query.talkshow = chkTalkShow.Checked;
            query.biography = chkBiography.Checked;
            query.drama = chkDrama.Checked;
            query.gameshow = chkGameShow.Checked;
            query.musical = chkMusical.Checked;
            query.romance = chkRomance.Checked;
            query.thriller = chkThriller.Checked;

            query.director = txtDirector.Text.Trim();

            foreach (TextBox actor in textActors)
            {
                query.actors.Add(actor.Text.Trim());
            }

            query.g = chkG.Checked;
            query.pg = chkPG.Checked;
            query.pg13 = chkPG13.Checked;
            query.r = chkR.Checked;
            query.nc17 = chkNC17.Checked;
            query.approved = chkApproved.Checked;
            query.noCertification = chkNoCertification.Checked;

            query.rating1 = (int)numericRating1.Value;
            query.rating2 = (int)numericRating2.Value;

            query.year1 = (int)numericYear1.Value;
            query.year2 = (int)numericYear2.Value;

            query.length1 = (int)numericLength1.Value;
            query.length2 = (int)numericLength2.Value;

            query.Search();

            ApplicationManager.changeForm("RESULTS", query);
        }