You can simply add the constructor for second window, in which you'll pass the parameter to identify clicked button, it could be a button.Tag property, or even the whole button object (but it would be not efficient way.
private Button_Click(object sender, RoutedEventArgs e)
{
Button button = sender as Button;
if(button!=null)
{
Window2 window = new Window2(button.Tag);
}
else
{
Window2 window = new Window2();
}
}