本文整理汇总了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);
}
示例2: Given
public override void Given()
{
base.Given();
_key = "Test";
_presenter = _mock.DynamicMock<IPresenter>();
}
示例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;
}
}
示例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);
}
示例5: DetailForm
public DetailForm(string article)
: this()
{
if (!DesignMode)
{
_presenter = IoC.Resolve<IPresenter<IDetailView>>(new {view = this, article = article});
}
}
示例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);
}
示例7: MainForm
public MainForm()
{
InitializeComponent();
if (!DesignMode)
{
_presenter = IoC.Resolve<IPresenter<IMainFormView>>(new {view = this});
}
}
示例8: MainWindow
public MainWindow(IPresenter controller)
{
m_Controller = controller;
InitializeComponent();
loggerType.Items.Add(LoggerFactory.ConsoleLoggerName);
loggerType.Items.Add(LoggerFactory.MessageboxLoggerName);
loggerType.SelectedIndex = 0;
}
示例9: Release
public void Release(IPresenter presenter)
{
container.EjectAllInstancesOf<IPresenter>();
var disposablePresenter = presenter as IDisposable;
if (disposablePresenter != null)
disposablePresenter.Dispose();
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例15: Release
public virtual void Release(IPresenter presenter)
{
this._container.EjectAllInstancesOf<IPresenter>();
IDisposable disposablePresenter = presenter as IDisposable;
if(disposablePresenter != null)
disposablePresenter.Dispose();
}