当前位置: 首页>>代码示例>>C#>>正文


C# IPresenter类代码示例

本文整理汇总了C#中IPresenter的典型用法代码示例。如果您正苦于以下问题:C# IPresenter类的具体用法?C# IPresenter怎么用?C# IPresenter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPresenter类属于命名空间,在下文中一共展示了IPresenter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Question

 public Question(IPresenter master, string text, params Answer[] possibleAnswers)
 {
     Master = master;
     Text = text;
     PossibleAnswers = new BindableEnumCollection<Answer>(possibleAnswers);
     Buttons = ConvertToButtons(possibleAnswers);
 }
开发者ID:Buthrakaur,项目名称:WpfModularApp,代码行数:7,代码来源:Question.cs

示例2: Given

        public override void Given()
        {
            base.Given();

            _key = "Test";
            _presenter = _mock.DynamicMock<IPresenter>();
        }
开发者ID:RookieOne,项目名称:RPG,代码行数:7,代码来源:When_registering_a_presenter.cs

示例3: Bind

        public void Bind(IPresenter presenter)
        {
            var presenterType = presenter.GetType();
            var menu = BindingHelper.GetViewControls(presenter.View).OfType<MenuStrip>().FirstOrDefault();
            if (menu == null)
                return;

            var items = GetMenuItems(menu);

            var presenterMethods = BindingHelper.GetParameterlessActionMethods(presenterType);

            foreach (var method in presenterMethods)
            {
                string methodName = method.Name;
                var item = items.FirstOrDefault(
                    x => x.Name == Convensions.MenuItemPrefix + methodName.Substring(Convensions.EventHandlerPrefix.Length));

                if (item == null)
                    continue;

                var action = (Action)Delegate.CreateDelegate(typeof(Action), presenter, method.Name);

                var handler = (EventHandler)((sender, args) => action());
                item.Click += handler;
            }
        }
开发者ID:nyxiscoo1,项目名称:DipDemo,代码行数:26,代码来源:MenuClickEventBinder.cs

示例4: CommandActionsEntryPoint

 public CommandActionsEntryPoint(ICommandManager commandManager, ITheaterApplicationHost appHost, IPresenter presentationManager, IPlaybackManager playbackManager, INavigator navigationService, /*IScreensaverManager screensaverManager,*/ ILogManager logManager, IEventAggregator events)
 {
     _commandManager = commandManager;
     _defaultCommandActionMap = new DefaultCommandActionMap(appHost, presentationManager, playbackManager, navigationService, /*screensaverManager,*/ logManager, events);
 
     _logger = logManager.GetLogger(GetType().Name);
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:7,代码来源:CommandActionsEntryPoint.cs

示例5: DetailForm

 public DetailForm(string article)
     : this()
 {
     if (!DesignMode)
       {
     _presenter = IoC.Resolve<IPresenter<IDetailView>>(new {view = this, article = article});
       }
 }
开发者ID:agross,项目名称:SimpleMvp,代码行数:8,代码来源:DetailForm.cs

示例6: UpdateTitle

        private void UpdateTitle(IPresenter presenter)
        {
            var oldTitle = HtmlPage.Document.GetProperty("title");
            var newTitle = _config.AlterTitle(oldTitle.ToString(), presenter);

            if (!string.IsNullOrEmpty(newTitle))
                HtmlPage.Document.SetProperty("title", newTitle);
        }
开发者ID:Buthrakaur,项目名称:WpfModularApp,代码行数:8,代码来源:HistoryCoordinator.cs

示例7: MainForm

 public MainForm()
 {
     InitializeComponent();
       if (!DesignMode)
       {
     _presenter = IoC.Resolve<IPresenter<IMainFormView>>(new {view = this});
       }
 }
开发者ID:agross,项目名称:SimpleMvp,代码行数:8,代码来源:MainForm.cs

示例8: MainWindow

 public MainWindow(IPresenter controller)
 {
     m_Controller = controller;
     InitializeComponent();
     loggerType.Items.Add(LoggerFactory.ConsoleLoggerName);
     loggerType.Items.Add(LoggerFactory.MessageboxLoggerName);
     loggerType.SelectedIndex = 0;
 }
开发者ID:fresky,项目名称:DIExample,代码行数:8,代码来源:MainWindow.xaml.cs

示例9: Release

        public void Release(IPresenter presenter)
        {
            container.EjectAllInstancesOf<IPresenter>();

            var disposablePresenter = presenter as IDisposable;
            if (disposablePresenter != null)
                disposablePresenter.Dispose();
        }
开发者ID:unochild,项目名称:webformsmvp,代码行数:8,代码来源:StructureMapPresenterFactory.cs

示例10: Release

 /// <summary>
 /// Releases the specified presenter from any of its lifestyle demands.
 /// </summary>
 /// <param name="presenter">The presenter to release.</param>
 public void Release(IPresenter presenter)
 {
     var disposablePresenter = presenter as IDisposable;
     if (disposablePresenter != null)
     {
         disposablePresenter.Dispose();
     }
 }
开发者ID:phiree,项目名称:dzdocs,代码行数:12,代码来源:DefaultPresenterFactory.cs

示例11: ModsPageView

 public ModsPageView(IParkitect parkitect, ILogger log, IPresenter parent, IQueueableTaskManager queueableTaskManager,
     IWebsite website)
     : base(parkitect, website, log, AssetType.Mod, parent, "Mods")
 {
     _parkitect = parkitect;
     _queueableTaskManager = queueableTaskManager;
     _website = website;
 }
开发者ID:ParkitectNexus,项目名称:ParkitectNexusClient,代码行数:8,代码来源:ModsPageView.cs

示例12: LoginContext

 public LoginContext(IApplicationHost appHost, IPresenter presenter, ISessionManager sessionManager,
                     ILogManager logManager, IImageManager imageManager, IApiClient apiClient) : base(appHost)
 {
     _presenter = presenter;
     _sessionManager = sessionManager;
     _logManager = logManager;
     _imageManager = imageManager;
     _apiClient = apiClient;
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:9,代码来源:LoginContext.cs

示例13: SideMenuContext

 public SideMenuContext(ITheaterApplicationHost appHost, IPresenter presenter, ISessionManager sessionManager, IImageManager imageManager, IApiClient apiClient)
     : base(appHost)
 {
     _appHost = appHost;
     _presenter = presenter;
     _sessionManager = sessionManager;
     _imageManager = imageManager;
     _apiClient = apiClient;
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:9,代码来源:SideMenuContext.cs

示例14: SessionManager

//        private readonly IPlaybackManager _playback;

        public SessionManager(INavigator navService, IPresenter presenter, IApiClient apiClient, ILogger logger, ITheaterConfigurationManager config) //, IPlaybackManager playback)
        {
            _navService = navService;
            _presenter = presenter;
            _apiClient = apiClient;
            _logger = logger;
            _config = config;
//            _playback = playback;
        }
开发者ID:TomGillen,项目名称:MBT,代码行数:11,代码来源:SessionManager.cs

示例15: Release

        public virtual void Release(IPresenter presenter)
        {
            this._container.EjectAllInstancesOf<IPresenter>();

            IDisposable disposablePresenter = presenter as IDisposable;

            if(disposablePresenter != null)
                disposablePresenter.Dispose();
        }
开发者ID:HansKindberg-Net,项目名称:HansKindberg-Web-MVP,代码行数:9,代码来源:PresenterFactory.cs


注:本文中的IPresenter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。