Example #1
0
        public void Save__SavesToBackingStore()
        {
            ShellPresenter test = BuildDefaultShellPresenter();

            test.Save();

            _fakeBackingStore.Verify(x => x.Save());
        }
Example #2
0
        public void Initialize__InitializesBackingStore()
        {
            ShellPresenter test = BuildDefaultShellPresenter();

            test.Initialize();

            _fakeBackingStore.Verify(x => x.Initialize());
        }
Example #3
0
    static void Main()
    {
        IShellView someView = new View();
        //calling code
        ShellPresenter sp = new ShellPresenter();

        //Why is this allowed?
        sp.View = someView;        //because now its within the class
    }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var context   = new ApplicationContext();
            var presenter = new ShellPresenter();

            context.MainForm = presenter.View;
            Application.Run(context);
        }
Example #5
0
        //Here to implement
        //IEnumerable<DefaultView> _defaultViews;
        //AccessRightsService _accessRightsService;

        protected override DependencyObject CreateShell()
        {
            /*    Container.RegisterInstance<IAccessRightsService>(_accessRightsService);
             *  Container.RegisterInstance<IPermissionChecker>(_accessRightsService);
             *  Container.RegisterInstance<IUser>(_accessRightsService.CurrentUser);*/
            _shellPresenter = Container.Resolve <ShellPresenter>();
            Container.RegisterInstance <IShell>(_shellPresenter);
            Container.RegisterInstance <IShellInteraction>(_shellPresenter);
            _shellPresenter.Execute();
            return(_shellPresenter.View);
        }
Example #6
0
 protected override void Before_each_spec()
 {
     _shellPresenter = Create<ShellPresenter>();
 }
Example #7
0
        public void ShowModal()
        {
            ensureVisible(true);

            ShellPresenter.DimBackgroundWhile(() => ShowDialog());
        }