Ejemplo n.º 1
0
        public YesNoDialog(YesNoDialogLogic logic)
        {
            this.DataContext = logic;

            // Tell the logic how to close this dialog
            logic.CloseView = result => DialogResult = result;

            InitializeComponent();
        }
Ejemplo n.º 2
0
        public YesNoDialog(YesNoDialogLogic logic)
        {
            logic.CloseView = result => DialogResult = result == true ? DialogResult.OK : DialogResult.Cancel;

            InitializeComponent();

            Text              = logic.Title;
            labelString.Text  = logic.Question;
            buttonOK.Text     = logic.LeftButtonText;
            buttonCancel.Text = logic.RightButtonText;
        }