private void NewTask(object o)
        {
            FrmNewEditTaskWindow newtaskWindow = new FrmNewEditTaskWindow();

            newtaskWindow.ShowDialog();
            RefreshByFilter();
        }
        public void EditTask(object o)
        {
            var taskList = o as System.Windows.Controls.ListBox;

            if (taskList.Items == null || taskList.Items.Count <= 0)
            {
                return;
            }

            if (taskList.SelectedItems.Count > 1)
            {
                MessageBox.Show("You can not edit multiple tasks at the same time", Enums.MessageTypes.Information.ToString(), MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }

            var selectedTask = (TaskModel)taskList.SelectedItem;
            FrmNewEditTaskWindow newtaskWindow = new FrmNewEditTaskWindow(selectedTask.IdTask);

            newtaskWindow.ShowDialog();
            RefreshByFilter();
        }