private void ButtonAddExpense_Click(object sender, RoutedEventArgs e)
        {
            var messageQueue = SnackbarThree.MessageQueue;

            if (TextBoxValue.Text == string.Empty)
            {
                TextBoxValue.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Informe o valor da saída"));
                return;
            }

            if (DatePickerData.Text == string.Empty)
            {
                DatePickerData.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Informe a data saída"));
                return;
            }

            if (ComboBoxCategory.Text == string.Empty)
            {
                ComboBoxCategory.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Informe a categoria da saída"));
                return;
            }

            if (ComboBoxAccounts.Text == string.Empty)
            {
                ComboBoxAccounts.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Informe a conta da saída"));
                return;
            }

            Double   value    = Double.Parse(TextBoxValue.Text, NumberStyles.Currency);
            DateTime date     = DatePickerData.SelectedDate ?? DateTime.Now;
            var      account  = ComboBoxAccounts.SelectedItem;
            var      goal     = ComboBoxGoals.SelectedItem;
            var      category = ComboBoxCategory.SelectedItem;

            if (goal != null)
            {
                control.DebitGoal(goal, value);
            }

            control.SaveExpense(value, date, account, category);
            LoadExpenses();

            TextBoxValue.Text = string.Empty;
            ComboBoxAccounts.SelectedIndex = -1;
            DatePickerData.Text            = string.Empty;
            ComboBoxGoals.SelectedIndex    = -1;
            ComboBoxCategory.SelectedIndex = -1;
        }
        private void ButtonAddIncoming_Click(object sender, RoutedEventArgs e)
        {
            var messageQueue = SnackbarThree.MessageQueue;

            if (TextBoxValue.Text == string.Empty)
            {
                TextBoxValue.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Saisir la valeur de l'entrée"));
                return;
            }

            if (DatePickerData.Text == string.Empty)
            {
                DatePickerData.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Saisir la date d'entrée"));
                return;
            }

            if (ComboBoxCategory.Text == string.Empty)
            {
                ComboBoxCategory.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Entrez la catégorie d'entrée"));
                return;
            }

            if (ComboBoxAccounts.Text == string.Empty)
            {
                ComboBoxAccounts.Focus();
                Task.Factory.StartNew(() => messageQueue.Enqueue("Saisissez la facture d'entrée"));
                return;
            }

            Double   value    = Double.Parse(TextBoxValue.Text, NumberStyles.Currency);
            DateTime date     = DatePickerData.SelectedDate ?? DateTime.Now;
            var      account  = ComboBoxAccounts.SelectedItem;
            var      category = ComboBoxCategory.SelectedItem;

            control.SaveIncoming(value, date, account, category);
            LoadIncomings();

            TextBoxValue.Text = string.Empty;
            ComboBoxAccounts.SelectedIndex = -1;
            DatePickerData.Text            = string.Empty;
            ComboBoxCategory.SelectedIndex = -1;
        }