private void AddTaskButton_Click(object sender, RoutedEventArgs e)
        {
            TaskWindow taskWindow = new TaskWindow(Client);

            taskWindow.Show();
            taskWindow.Closed += TaskWindow_Closed;
        }
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            Task       _toEdit    = new Task(((Task)((MenuItem)sender).DataContext).Title, ((Task)((MenuItem)sender).DataContext).Description, ((Task)((MenuItem)sender).DataContext).Deadline, ((Task)((MenuItem)sender).DataContext).Tags);
            TaskWindow taskWindow = new TaskWindow(Client, _toEdit);

            taskWindow.Show();
            MainList.Tasks.Remove(_toEdit);
            try
            {
                Client.DeleteTasks(JsonConverter.ToJson(MainList));
            }
            catch
            {
                MessageBox.Show("Can't recieve data. Aborting process");
                App.Current.Shutdown();
            }
            taskWindow.Closed += TaskWindow_Closed;
        }