private void refresh() { tokenList.Items.Clear(); List <string> list = OauthToken.Load(); foreach (string s in list) { ListBoxItem item = new ListBoxItem(); item.Content = s; item.MouseDoubleClick += Item_MouseDoubleClick; tokenList.Items.Add(item); } }
private void Item_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Token = OauthToken.Load((string)((ListBoxItem)sender).Content); DialogResult = true; Close(); }