public override void Execute() { if (_objectToSpy != null) { var frmSpy = new FrmObjectSpy(); frmSpy.SetDataSource(_objectToSpy); frmSpy.WindowState = FormWindowState.Normal; frmSpy.ShowDialog(); frmSpy.Dispose(); } }
public override void Execute() { if (_form != null) { var spy = _form as ISpyObject; Debug.Assert(spy != null, "Can't spy this form!"); if (spy != null) { var frmSpy = new FrmObjectSpy(); frmSpy.SetDataSource(spy.SpyObject()); frmSpy.WindowState = FormWindowState.Normal; frmSpy.ShowDialog(); frmSpy.Dispose(); } } }