private void daysLabel_Click(object sender, EventArgs e)
        {
            label3.Visible = daysLabel.Visible = todayLabel.Visible = label1.Visible = cityOutput.Visible = temp.Visible = min.Visible = max.Visible = date.Visible = false;

            ForecastScreen fs = new ForecastScreen();

            this.Controls.Add(fs);
        }
Esempio n. 2
0
        private void forecastButton_Click(object sender, EventArgs e)
        {
            currentButton.Visible = forecastButton.Visible = label1.Visible = false;

            ForecastScreen fs = new ForecastScreen();

            this.Controls.Add(fs);
        }
Esempio n. 3
0
        private void forecastLabel_Click(object sender, EventArgs e)
        {
            Form f = this.FindForm();

            f.Controls.Remove(this);
            ForecastScreen fs = new ForecastScreen();

            f.Controls.Add(fs);
        }
        /// <summary>
        /// When the forecast label is clicked this user control is removed from the form
        /// and the ForecastScreen user control is added to the form.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void ForecastLabel_Click(object sender, EventArgs e) //When forecast label is clicked
        {
            Form f = FindForm();

            f.Controls.Remove(this);

            ForecastScreen fs = new ForecastScreen();

            f.Controls.Add(fs);
        }
Esempio n. 5
0
        private void forecastLabel_Click_1(object sender, EventArgs e)
        {
            //Close Current Screen
            Form f = this.FindForm();

            f.Controls.Remove(this);

            //Open forecast Screen
            ForecastScreen fs = new ForecastScreen();

            f.Controls.Add(fs);
        }
        private void CurrentScreen_MouseDown(object sender, MouseEventArgs e)
        {
            //Finds the coordinates of the region which allows the user to switch to the forecast screen
            Graphics g            = this.CreateGraphics();
            float    regionX      = forcastClick.GetBounds(g).X;
            float    regionY      = forcastClick.GetBounds(g).Y;
            float    regionWidth  = forcastClick.GetBounds(g).Width;
            float    regionHeight = forcastClick.GetBounds(g).Height;

            //Determines if the mouse is within the forecast screen region
            if (e.X >= regionX && e.X <= regionX + regionWidth &&
                e.Y >= regionY && e.Y <= regionY + regionHeight)
            {
                //Closes this user control and opens the forecast screen
                Form f = this.FindForm();
                f.Controls.Remove(this);
                ForecastScreen fs = new ForecastScreen();
                f.Controls.Add(fs);
            }
        }