private void AddItem()
        {
            var window = new StringEditWindow();

            window.Value = Items.LastOrDefault();

            var add = window.ShowDialog() == true;

            if (add)
            {
                MainListView.Items.Add(window.Value.Trim());
                Changed = true;
            }
        }
        private void EditItem_Click(object sender, RoutedEventArgs e)
        {
            string item = ((sender as Button)?.DataContext as string);

            if (item == null)
            {
                return;
            }

            var window = new StringEditWindow();

            window.Value = item;

            var result = window.ShowDialog();


            if (result == true && window.HasEdited)
            {
                MainListView.Items.Remove(item);
                MainListView.Items.Add(window.Value);

                Changed = true;
            }
        }