Пример #1
0
        public void Save__SavesToBackingStore()
        {
            ShellPresenter test = BuildDefaultShellPresenter();

            test.Save();

            _fakeBackingStore.Verify(x => x.Save());
        }
Пример #2
0
        public void Initialize__InitializesBackingStore()
        {
            ShellPresenter test = BuildDefaultShellPresenter();

            test.Initialize();

            _fakeBackingStore.Verify(x => x.Initialize());
        }
Пример #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);
        }
Пример #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);
        }
Пример #6
0
 protected override void Before_each_spec()
 {
     _shellPresenter = Create<ShellPresenter>();
 }
Пример #7
0
        public void ShowModal()
        {
            ensureVisible(true);

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