Example #1
0
 private void advancedSearchLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     AdvancedSearch ads = new AdvancedSearch();
     ads.Show();
 }
Example #2
0
        public void drawMovies(List<Movie> movies,Dictionary<string,Color> colorMap,List<string> genres)
        {
            curMovies.Clear();

            //need to free memory from the panels
            foreach(Control c in this.Controls)
            {
                c.Dispose();
            }

            this.Controls.Clear();

            int lX;
            int lY;

            ToolTip toolTip1 = new ToolTip();
            Panel p;

            toolTip1.AutoPopDelay = 5000;
            toolTip1.InitialDelay = 500;
            toolTip1.ReshowDelay = 500;
            toolTip1.ShowAlways = true;

            foreach (Movie m in movies)
            {
                if(m.Year >= lowerYear && m.Year <= higherYear && m.Rating >= lowerPop && m.Rating <= higherPop)
                {

                    try
                    {
                        p = new Panel();
                        p.Size = new System.Drawing.Size(10, 10);
                        lX = getXLocation(m.Year);
                        lY = getYLocation(m.Rating);
                        p.Location = new System.Drawing.Point(lX, lY);
                        p.BackColor = getColor(colorMap, genres, m);
                        toolTip1.SetToolTip(p, m.Title);
                        p.Click += new System.EventHandler(this.openMovieInfo);

                        curMovies[p] = m;
                        this.Controls.Add(p);
                    }
                    catch(Exception)
                    {
                        ((Form)this.TopLevelControl).Close();
                        AdvancedSearch adv = new AdvancedSearch();
                        adv.Show();

                    }

                }

            }
        }