我有 2 个表格。
表格1:
public partial class Panel1
{
public void ShowExport(object sender, EventArgs e)
{
.......
}
}
表格2:
public partial class Panel2
{
public delegate void ShowExportReport(object sender, EventArgs e);
public event ShowExportReport ShowExportClicked;
private void buttonExport_Click(object sender, RoutedEventArgs e)
{
if (ShowExportClicked != null)
{
ShowExportClicked(sender, new EventArgs());
}
}
}
当我单击按钮时-
button.Click = buttonExport_Click
如何从Panel2.buttonExport_Click调用Panel1.ShowExport()?