本文整理汇总了C#中IViewFactory类的典型用法代码示例。如果您正苦于以下问题:C# IViewFactory类的具体用法?C# IViewFactory怎么用?C# IViewFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IViewFactory类属于命名空间,在下文中一共展示了IViewFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindableLayoutInflater
public BindableLayoutInflater(IViewFactory factory, Context context)
: base(context)
{
Should.NotBeNull(factory, "factory");
_viewFactory = factory;
Initialize();
}
示例2: ContactsModuleViewModel
public ContactsModuleViewModel(IViewFactory viewFactory)
{
Contract.Requires(viewFactory != null, "View Factory can not be null.");
this._ViewFactory = viewFactory;
this.InitializeCommands();
}
示例3: MotherShip
public MotherShip(IViewFactory i_Factory)
: base(i_Factory, @"Sprites\MotherShip_32x120")
{
Color = Color.Red;
Alive = false;
Score = 500;
}
示例4: BiomeListController
/// <summary>
/// Setup constructor
/// </summary>
/// <param name="viewFactory">View factory</param>
/// <param name="context">Selected biome context</param>
/// <param name="completeBiomeList">List of all biomes that can be selected</param>
/// <param name="currentBiomeList">Current biome list</param>
/// <param name="view">View to watch</param>
/// <exception cref="System.ArgumentNullException">Thrown if workspace, model or view are null</exception>
public BiomeListController( IViewFactory viewFactory, SelectedBiomeContext context, BiomeListModel completeBiomeList, BiomeListModel currentBiomeList, IBiomeListView view )
{
Arguments.CheckNotNull( viewFactory, "viewFactory" );
Arguments.CheckNotNull( context, "context");
Arguments.CheckNotNull( completeBiomeList, "completeBiomeList" );
Arguments.CheckNotNull( currentBiomeList, "currentBiomeList" );
Arguments.CheckNotNull( view, "view" );
m_ViewFactory = viewFactory;
m_Context = context;
m_AllBiomes = completeBiomeList;
m_CurrentBiomes = currentBiomeList;
// Run through all the available biomes
foreach ( BiomeModel model in m_AllBiomes.Models )
{
// Add the current biome to the view. Set it as selected if it is in the current biome list
view.AddBiome( model, m_CurrentBiomes.Models.IndexOf( model ) != -1 );
}
view.OnCreateBiome += OnCreateBiome;
view.OnAddBiome += OnAddBiome;
view.OnRemoveBiome += OnRemoveBiome;
view.BiomeSelected += OnBiomeSelected;
view.OnDeleteBiome += OnDeleteBiome;
m_View = view;
}
示例5: DefaultNancyModuleBuilder
/// <summary>
/// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
/// </summary>
/// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
/// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
/// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
/// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
public DefaultNancyModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
{
this.viewFactory = viewFactory;
this.responseFormatterFactory = responseFormatterFactory;
this.modelBinderLocator = modelBinderLocator;
this.validatorLocator = validatorLocator;
}
示例6: Bullet
public Bullet(IViewFactory i_Factory, eSpriteType i_Type)
: base(i_Factory, @"Sprites\Bullet")
{
Alive = false;
Type = i_Type;
BulletHit += Bullet_Dummy;
}
示例7: DefaultModuleBuilder
/// <summary>
/// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
/// </summary>
/// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
/// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
/// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
/// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
public DefaultModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
{
_viewFactory = viewFactory;
_responseFormatterFactory = responseFormatterFactory;
_modelBinderLocator = modelBinderLocator;
_validatorLocator = validatorLocator;
}
示例8: RegisterViews
/*Cada vista nueva, debe estar registarada aquí, ya que es ViewFactory es de donde recuperamos las referencias*/
protected override void RegisterViews(IViewFactory viewFactory)
{
//TODO viewFactory.Register<LoginViewModel, Login>();
//TODO viewFactory.Register<RegistroViewModel, Registro>();
//TODO viewFactory.Register<PrincipalViewModel, Principal>();
}
示例9: RegisterViews
protected override void RegisterViews(IViewFactory viewFactory)
{
viewFactory.Register<LoginViewModel,Login>();
viewFactory.Register<RegistroViewModel, Registro>();
viewFactory.Register<PrincipalViewModel, Principal>();
viewFactory.Register<NuevoBlocViewModel,NuevoBlocView>();
}
示例10: RegisterViews
protected override void RegisterViews(IViewFactory viewFactory)
{
viewFactory.Register<LoginViewModel, LoginPage>();
viewFactory.Register<LandingPageViewModel, LandingPage>();
viewFactory.Register<OrderFormViewModel, OrderFormPage>();
viewFactory.Register<RestaurantViewModel, RestaurantPage>();
viewFactory.Register<MenuViewModel, MenuPage>();
}
示例11: ViewController
/// <summary>
/// Constructor for ViewController.
/// </summary>
/// <param name="messageBus">
/// The <see cref="IMessageBus"/> which will be used to listen for view requests.
/// </param>
/// <param name="viewFactory">
/// The <see cref="IViewFactory"/> which will be used to build the views.
/// </param>
/// <param name="viewPlacer">
/// The <see cref="IViewPlacer"/> which will be used to place the views.
/// </param>
public ViewController(IMessageBus messageBus, IViewFactory viewFactory, IViewPlacer viewPlacer)
{
MessageBus = messageBus;
ViewFactory = viewFactory;
ViewPlacer = viewPlacer;
Initialize();
}
示例12: ConsoleJSLintProvider
public ConsoleJSLintProvider(Func<IJSLintContext> jsLintFactory, IFileSystemWrapper fileSystemWrapper, ISettingsRepository settingRepository, IConsoleWriter consoleWriter, IViewFactory viewFactory)
{
this.jsLintFactory = jsLintFactory;
this.fileSystemWrapper = fileSystemWrapper;
this.settingRepository = settingRepository;
this.consoleWriter = consoleWriter;
this.viewFactory = viewFactory;
}
示例13: PinkMonster
public PinkMonster(IViewFactory i_Factory)
: base(i_Factory, @"Sprites\Enemies_96x64")
{
Color = Color.LightPink;
Score = 300;
AddSourceRectangle(new Rectangle(0, 0, 32, 32));
AddSourceRectangle(new Rectangle(0, 32, 32, 32));
}
示例14: ShareTargetManager
// *** Constructors ***
public ShareTargetManager(IActivationManager activationManager, IViewFactory viewFactory)
{
this.viewFactory = viewFactory;
// Register with the activation manager
activationManager.Register(this);
}
示例15: RegisterViews
protected override void RegisterViews(IViewFactory viewFactory)
{
viewFactory.Register<LoginViewModel, Login>();
viewFactory.Register<RegisterViewModel, Register>();
viewFactory.Register<PrincipalViewModel, Principal>();
viewFactory.Register<ListadoViewModel,Listado>();
viewFactory.Register<MainViewModel,Main>();
}