private void button_Click(object sender, RoutedEventArgs e) { string result = ""; foreach (WorkshopItemUi item in stackpanel.Children) { if (item.IncludeInLUA) { result += item.getResourceString() + "\r\n"; } } if (r == null) { r = new resultWindow(result); r.Closing += R_Closing; } else { r.setText(result); } r.Show(); }
private void R_Closing(object sender, System.ComponentModel.CancelEventArgs e) { r = null; }