画面之间采用委托传递参数
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace WindowsFormsApplication2 {
{
{ InitializeComponent();
f2.ShowCounter = new f2.Show(); }
{
} } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace WindowsFormsApplication2 {
{
{ InitializeComponent(); }
{ counter++; ShowCounter?.Invoke(counter); } } } |