Example #1
0
        public void PromptUser(ICommonWindowContent <ICloseSource> content)
        {
            var dialog = new CommonDialogWindow <ICloseSource>(content);

            dialog.Activated += OnUserPromptActiviated;
            dialog.ShowModal();
            dialog.Activated -= OnUserPromptActiviated;
        }
Example #2
0
        public TResult PromptUser <TResult>(ICommonWindowContent <IViewModelBase <TResult> > content)
        {
            var dialog = new CommonDialogWindow <IViewModelBase <TResult> >(content);

            dialog.Activated += OnUserPromptActiviated;
            dialog.ShowModal();
            dialog.Activated -= OnUserPromptActiviated;
            return(dialog.ViewModel.Result);
        }
Example #3
0
 public void BeforeEach()
 {
     _contentMock =
         new Mock <ICommonWindowContent <ICloseSource> > {
         DefaultValueProvider = DefaultValueProvider.Mock
     };
     _contentMock.Setup(c => c.Title).Returns("Default Title");
     _objectUnderTest = new CommonDialogWindow <ICloseSource>(_contentMock.Object);
 }
Example #4
0
        public void TestConstructor_SetsTitle()
        {
            const string expectedTitle = "Expected Title";

            _contentMock.Setup(c => c.Title).Returns(expectedTitle);

            _objectUnderTest = new CommonDialogWindow <ICloseSource>(_contentMock.Object);

            Assert.AreEqual(expectedTitle, _objectUnderTest.Title);
        }