public ExerciseWindow(HomeWindow window) { _returnController = new ReturnController(window); _exerciseControl = new ExerciseControl(window); InitializeComponent(); Browser.Visibility = Visibility.Collapsed; }
void Control_Init(object sender, EventArgs e) { ExerciseControl dropDownList = (ExerciseControl)sender; TextFieldEditor exerciseName = (TextFieldEditor)dropDownList.Parent.Parent.FindControl("InsertexerciseName"); if (exerciseName != null) { control = dropDownList; } }
private void Activity_Load(object sender, EventArgs e) { main main = this.Owner as main; if (main != null) { exerciseControl = new ExerciseControl(main.usercontroler.CurrentUser, tableName, ActivityGrid); exerciseControl.LoadExerciseData(); Calories = main.BurnedCalories; } }
public HomeWindow(Patient patient) { _logoutControl = new LogoutControl(this); _patient = patient; _updateJournalControl = new UpdateJournalControl(this, _patient, _journal); _exerciseControl = new ExerciseControl(this); _reminderControl = new TrainingReminderControl(this); InitializeComponent(); welcomeL.Text = "Hej " + _patient.Name + ". Her kan du se dine træningsøvelser eller opdatere din dagbog. God træning :-)"; }
public void AddPage(Template template) { TabPage page = new TabPage(template.Info.Number.ToString()); ExerciseControl control = ExerciseControl.Create(template); control.Completed += ControlOnCompleted; page.Controls.Add(control); page.SetSize(ClientSize.Width, Size.Height - 30); control.SetSize(page); TabPages.Add(page); }
static void Main(string[] args) { Console.WriteLine("Your name:"); var name = Console.ReadLine(); var userController = new UserControler(name); var eatingController = new EatControl(userController.CurrentUser); var exerciseControler = new ExerciseControl(userController.CurrentUser); if (userController.NewUser) { Console.WriteLine("Gender:"); var gender = Console.ReadLine(); var birth = ParseDateTime("Birth"); var weight = ParseDouble("weight"); var height = ParseDouble("height"); userController.SetNewUserData(gender, birth, weight, height); } Console.WriteLine(userController.CurrentUser); Console.WriteLine("Press E - for eating"); Console.WriteLine("Press A - for exercise"); var key = Console.ReadKey(); switch (key.Key) { case ConsoleKey.E: var foods = EnterEating(); eatingController.Add(foods.Food, foods.Weight); foreach (var item in eatingController.Eating.Foods) { Console.WriteLine($"\t{item.Key} - {item.Value}"); } break; case ConsoleKey.A: var exe = EnterExercise(); exerciseControler.Add(exe.Activity, exe.Begin, exe.End); foreach (var item in exerciseControler.Exercises) { Console.WriteLine($"\t{item.Activity} from {item.Start} to {item.Finish}"); } break; } Console.ReadLine(); }
public ExercisePicker() { // // TODO: Add constructor logic here // control = new ExerciseControl(); base.RenderControl = control; control.Init += new EventHandler(Control_Init); base.DataEditorControl.OnSave += new AbstractDataEditorControl.SaveEventHandler(DataEditorControl_OnSave); base.DataEditorControl.Load += new EventHandler(DataEditorControl_Load); base.DataEditorControl.DataBinding += new EventHandler(DataEditorControl_DataBinding); base.DataEditorControl.Editor.DataBinding += new EventHandler(Editor_DataBinding); base.DataEditorControl.Editor.Load += new EventHandler(Editor_Load); base.DataEditorControl.Control.DataBinding += new EventHandler(Control_DataBinding); base.DataEditorControl.Control.Load += new EventHandler(Control_Load); }
/// <summary> /// constructor til exercisewindow, opretter de ting, der skal bruges og putter exercisepakker ind i comboboxen /// </summary> /// <param name="homewindow"></param> /// <param name="patient"></param> public ExerciseWindow(HomeWindow homewindow, Patient patient) { _patient = patient; _homeWindow = homewindow; _exerciseControl = new ExerciseControl(); InitializeComponent(); DescriptionTB.Text = "Vælg en øvelsespakke!"; RepititionsTB.Text = ""; setNumberTB.Text = ""; //browserWB.Visibility = Visibility.Collapsed; foreach (var item in _patient.ExercisePackages) { exercisepackageCB.Items.Add(item.Name); } exercisepackageCB.SelectedItem = exercisepackageCB.Items[0]; videopath = _exerciseList[CurrentExerciseID].ExerciseLink; browserWB.NavigateToString(NavigateToYoutube(videopath)); }
/// <summary> /// constuctor til commentExcerciseWindow /// </summary> public CommentExerciseWindow() { _exerciseControl = new ExerciseControl(); InitializeComponent(); }
void Control_DataBinding(object sender, EventArgs e) { ExerciseControl dropDownList = (ExerciseControl)sender; }
void Control_Load(object sender, EventArgs e) { ExerciseControl dropDownList = (ExerciseControl)sender; }
public CommentExerciseWindow(ExerciseControl exerciseControl) { _exerciseControl = exerciseControl; InitializeComponent(); }