KbtterWPF.ExListWindow.Button_Click C# (CSharp) Method

Button_Click() private method

private Button_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (MyListsList.SelectedIndex == -1) return;
            var ls = (MyListsList.Items[MyListsList.SelectedIndex] as StackPanel).Tag as TwitterList;
            svc.DeleteList(new DeleteListOptions { ListId = ls.Id }, (lsx, re) =>
            {
                if (re.Error != null) return;
                MyListsList.Dispatch(() =>
                {
                    MyListsList.Items.RemoveAt(MyListsList.SelectedIndex);
                    MyListsList.SelectedIndex = -1;
                });
            });
        }