public FormSmartSaver() { InitializeComponent(); FinancialPlanController.ActivePlan.Savings = FinancialPlanController.ActivePlan.Income - FinancialPlanController.ActivePlan.GetSpendings(); this.Text = Resources.LStrings.SmartSaverLabel; setTrackBarValues(); labelStop.Visible = false; InitializeUI.loadGoals(btnAddGoal, buttondelete, labelStop, this, selection); InitializeUI.LoadCurrentDate(labelDate); }
private void buttondelete_Click(object sender, EventArgs e) { FormDeleteGoal dialog = new FormDeleteGoal(); dialog.ShowDialog(); int goalToDelete = dialog.comboBox1.SelectedIndex; InitializeUI.RemoveGoalVisuals(goalToDelete); this.Controls.Clear(); this.InitializeComponent(); FinancialPlanController.ActivePlan.Savings = FinancialPlanController.ActivePlan.Income - FinancialPlanController.ActivePlan.GetSpendings(); setTrackBarValues(); labelStop.Visible = false; InitializeUI.loadGoals(btnAddGoal, buttondelete, labelStop, this, selection); }