Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Invoker
- {
- Controller controller = new Controller();
- controller.IsOpen = true; // this line will trigger show the dialog
- controller.IsOpen = false; // do nothting
- }
- public class Controller
- {
- public bool IsOpen
- {
- get { return _isOpen; }
- set
- {
- _isOpen = value;
- if (_isOpen)
- {
- this.ShowDialog();
- }
- }
- }
- private bool _isOpen;
- private void ShowDialog()
- {
- // code to handle dialog show
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement