Skip to content

Instantly share code, notes, and snippets.

@tw0n
Created May 6, 2011 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tw0n/959265 to your computer and use it in GitHub Desktop.
Save tw0n/959265 to your computer and use it in GitHub Desktop.
Refresh Editing Form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Workout___Meal_Plan
{
public partial class editMondayMeal : Form
{
public editMondayMeal()
{
InitializeComponent();
}
internal Form workoutMealPlan;
private void btn_saveMondayMeals_Click(object sender, EventArgs e)
{
string mondayMealBreakfast = txtbox_editMondayMealBreakfast.Text;
string mondayMealLunch = txtbox_editMondayMealLunch.Text;
string mondayMealDinner = txtbox_editMondayMealDinner.Text;
string mondayMealSnack1 = txtbox_editMondayMealSnack1.Text;
string mondayMealSnack2 = txtbox_editMondayMealSnack2.Text;
Properties.Settings.Default.mondayBreakfast = mondayMealBreakfast;
Properties.Settings.Default.mondayLunch = mondayMealLunch;
Properties.Settings.Default.mondayDinner = mondayMealBreakfast;
Properties.Settings.Default.mondaySnack1 = mondayMealSnack1;
Properties.Settings.Default.mondaySnack2 = mondayMealSnack2;
Properties.Settings.Default.Save();
lbl_mondayMealEditBreakfast.Refresh();
lbl_mondayMealEditLunch.Refresh();
lbl_mondayMealEditDinner.Refresh();
lbl_editMondayMealSnack1.Refresh();
lbl_editMondayMealSnack2.Refresh();
this.Close();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment