/// <summary> /// When the Today label is clicked, this user control is removed from the form /// and the CurrentScreen user control is added to the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void todayLabel_Click(object sender, EventArgs e) { Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
//Swiches between screens private void currentLable_Click(object sender, EventArgs e) { Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen fs = new CurrentScreen(); f.Controls.Add(fs); }
private void forecastLabel2_Click(object sender, EventArgs e) // Switching screens when the forecast label is clicked { Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
private void currentLabel_Click(object sender, EventArgs e) { //switch to current screen Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
public Form1() { InitializeComponent(); ExtractForecast(); ExtractCurrent(); // open weather screen for todays weather CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
public Form1() { InitializeComponent(); ExtractForecast(); ExtractCurrent(); CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
private void label3_Click(object sender, EventArgs e) { //changes to the current screen on click Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
private void label3_Click(object sender, EventArgs e) { //transfers control to the current/today screen Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
private void label3_Click(object sender, EventArgs e) { //switching screens method Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
private void tabLabel_Click(object sender, EventArgs e) { //Close Forecast Screen Form f = this.FindForm(); f.Controls.Remove(this); //Open Current Screen CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
public Form1() { //sets default location to stratford and runs both functions to retrieve data from open weather InitializeComponent(); location = "stratford, CA"; ExtractForecast(location); ExtractCurrent(location); // open weather screen for todays weather CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
private void todayLabel_Click(object sender, EventArgs e) { date1.Visible = max1.Visible = min1.Visible = temp1.Visible = day1.Visible = false; date2.Visible = max2.Visible = min2.Visible = temp2.Visible = day2.Visible = false; date3.Visible = max3.Visible = min3.Visible = temp3.Visible = day3.Visible = false; date4.Visible = max4.Visible = min4.Visible = temp4.Visible = day4.Visible = false; date5.Visible = max5.Visible = min5.Visible = temp5.Visible = day5.Visible = false; date6.Visible = max6.Visible = min6.Visible = temp6.Visible = day6.Visible = cityOutput.Visible = false; daysLabel.Visible = todayLabel.Visible = label4.Visible = false; CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
public Form1() { city = temp = weather = time = ""; InitializeComponent(); GetData(); ExtractCurrent(); ExtractForecast(); // open weather screen for todays weather CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
public Form1() { InitializeComponent(); for (int x = 0; x < 7; x++) { days.Add(new Day()); } ExtractForecast(); ExtractCurrent(); // open weather screen for todays weather CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
public Form1() { //Sets default city city = "stratford,CA"; InitializeComponent(); //Run to get info ExtractForecast(); ExtractCurrent(); //open weather screen for todays weather CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
private void ForecastScreen_MouseDown(object sender, MouseEventArgs e) { float regionX = currentClick.GetBounds(g).X; float regionY = currentClick.GetBounds(g).Y; float regionWidth = currentClick.GetBounds(g).Width; float regionHeight = currentClick.GetBounds(g).Height; if (e.X >= regionX && e.X <= regionX + regionWidth && e.Y >= regionY && e.Y <= regionY + regionHeight) { Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); } }
private void SearchPicBox_Click(object sender, EventArgs e) { //searches for the city that has been entered, if teh city is not found, defaults to stratford Form1.days.Clear(); location = SearchBox.Text; Form1.ExtractForecast(location); Form1.ExtractCurrent(location); Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
private void WaterlooLabel_Click(object sender, EventArgs e) { //inputs data to gve Waterloo's weather Form1.days.Clear(); Form1.location = "waterloo,CA"; Form1.ExtractForecast(Form1.location); Form1.ExtractCurrent(Form1.location); Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); }
public Form1() { InitializeComponent(); //Records all relevant data GetData(); if (breakCheck == false) { ExtractCurrent(); ExtractForecast(); } //Opens weather screen for todays weather CurrentScreen cs = new CurrentScreen(); this.Controls.Add(cs); }
private void button1_Click(object sender, EventArgs e) { try { string location = textBox1.Text; Form1.ExtractForecast(location); Form1.ExtractCurrent(location); Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); } catch { label4.Text = "please input proper city"; } }
private void searchButton_Click(object sender, EventArgs e) { try { Form1.location = cityInput.Text; Form1.ExtractForecast(); Form1.ExtractCurrent(); if (cityInput.Text == "") { errorLabel.Text = "Please try again"; } else { Form f = this.FindForm(); f.Controls.Remove(this); CurrentScreen cs = new CurrentScreen(); f.Controls.Add(cs); } } catch { errorLabel.Text = "Please try again"; } }