Ejemplo n.º 1
0
        private void btnDeleteGoal_Click(object sender, RoutedEventArgs e)
        {
            Goals selectedGoal = lbxGoalsInProgress.SelectedItem as Goals;

            if (selectedGoal != null)
            {
                //Removes the selected goal from the list
                allSetGoals.Remove(selectedGoal);

                RefreshScreen();
            }
        }
Ejemplo n.º 2
0
        private void btnCreateGoal_Click(object sender, RoutedEventArgs e)
        {
            int goalNum = 0;

            if (goalNum == 0)
            {
                Goals g1 = new Goals()
                {
                    GoalName        = txtbxSetGoalName.Text,
                    GoalDescription = txtbxSetGoalDescription.Text
                };

                //add to list
                allSetGoals.Add(g1);
                RefreshScreen();
            }

            goalNum++;


            lbxGoalsInProgress.ItemsSource = allSetGoals;
        }