本文整理汇总了C#中IRegionManager类的典型用法代码示例。如果您正苦于以下问题:C# IRegionManager类的具体用法?C# IRegionManager怎么用?C# IRegionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IRegionManager类属于命名空间,在下文中一共展示了IRegionManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CustomerListVM
public CustomerListVM(IRegionManager regionManager)
{
this.regionManager = regionManager;
this._Customers = CustomerService.GetAllCustomers(0);
Add_Customer = new DelegateCommand(AddCustomerHandler);
}
示例2: ModuleOne
public ModuleOne(IRegionManager regionManager, CompositionContainer container)
{
if(regionManager == null) throw new ArgumentNullException("regionManager");
if(container == null) throw new ArgumentNullException("container");
_regionManager = regionManager;
_container = container;
}
示例3: CalendarViewModel
public CalendarViewModel(ICalendarService calendarService, IRegionManager regionManager)
{
this.synchronizationContext = SynchronizationContext.Current ?? new SynchronizationContext();
this.openMeetingEmailCommand = new DelegateCommand<Meeting>(this.OpenMeetingEmail);
this.meetings = new ObservableCollection<Meeting>();
this.calendarService = calendarService;
this.regionManager = regionManager;
this.calendarService.BeginGetMeetings(
r =>
{
var meetings = this.calendarService.EndGetMeetings(r);
this.synchronizationContext.Post(
s =>
{
foreach (var meeting in meetings)
{
this.Meetings.Add(meeting);
}
},
null);
},
null);
}
示例4: TaskViewModel
public TaskViewModel(IRegionManager regionManager, IAppResourceService appResourceService)
{
_regionManager = regionManager;
_appResourceService = appResourceService;
VmTitle = Names.TaskItem;
VmImage = _appResourceService.GetPng16("users");
}
示例5: ModuleInit
public ModuleInit(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator, IModuleManager moduleManager)
{
this.regionManager = regionManager;
this.container = container;
this.eventAggregator = eventAggregator;
this.moduleManager = moduleManager;
}
示例6: SalesModule
public SalesModule(IEventAggregator eventAggregator, INavigationService navigationService, IUnityContainer container, IRegionManager regionManager)
{
_container = container;
_regionManager = regionManager;
_navigationService = navigationService;
_eventAggregator = eventAggregator;
}
示例7: MainModuleClass
public MainModuleClass(IUnityContainer unityContainer, IRegionManager regionManager)
{
_regionManager = regionManager;
_unityContainer = unityContainer;
_unityContainer.RegisterType(typeof (IMusicGridPresenter), typeof (MusicGridPresenter), false);
_unityContainer.RegisterType(typeof(IMusicGridView), typeof(MusicGridView), false);
}
示例8: ModifierModule
public ModifierModule(IRegionManager regionManager, IUserService userService,
TicketNoteEditorView ticketNoteEditorView, TicketNoteEditorViewModel ticketNoteEditorViewModel,
TicketTagEditorView ticketTagEditorView, TicketTagEditorViewModel ticketTagEditorViewModel,
OrderTagGroupEditorView selectedOrdersView, OrderTagGroupEditorViewModel selectedOrdersViewModel,
AutomationCommandSelectorView automationCommandSelectorView, AutomationCommandSelectorViewModel automationCommandSelectorViewModel,
ProductTimerEditorView productTimerEditorView, ProductTimerEditorViewModel productTimerEditorViewModel)
{
_selectedOrdersView = selectedOrdersView;
_selectedOrdersViewModel = selectedOrdersViewModel;
_automationCommandSelectorView = automationCommandSelectorView;
_productTimerEditorView = productTimerEditorView;
_productTimerEditorViewModel = productTimerEditorViewModel;
_ticketNoteEditorView = ticketNoteEditorView;
_ticketNoteEditorViewModel = ticketNoteEditorViewModel;
_ticketTagEditorView = ticketTagEditorView;
_ticketTagEditorViewModel = ticketTagEditorViewModel;
_regionManager = regionManager;
EventServiceFactory.EventService.GetEvent<GenericEvent<SelectedOrdersData>>().Subscribe(OnSelectedOrdersDataEvent);
EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnDisplayTicketDetailsScreen);
EventServiceFactory.EventService.GetEvent<GenericEvent<TicketTagData>>().Subscribe(OnTicketTagDataSelected);
EventServiceFactory.EventService.GetEvent<GenericEvent<Ticket>>().Subscribe(OnTicketEvent);
EventServiceFactory.EventService.GetEvent<GenericEvent<AutomationCommand>>().Subscribe(OnAutomationCommandEvent);
}
示例9: RegisterNewPopupRegion
public static void RegisterNewPopupRegion(DependencyObject owner, string regionName)
{
// Creates a new region and registers it in the default region manager.
// Another option if you need the complete infrastructure with the default region behaviors
// is to extend DelayedRegionCreationBehavior overriding the CreateRegion method and create an
// instance of it that will be in charge of registering the Region once a RegionManager is
// set as an attached property in the Visual Tree.
RegionMngr = ServiceLocator.Current.GetAllInstances<IRegionManager>().First();
if (RegionMngr != null)
{
IRegion region = new SingleActiveRegion();
DialogActivationBehavior behavior;
#if SILVERLIGHT
behavior = new PopupDialogActivationBehavior();
#else
behavior = new WindowDialogActivationBehavior();
#endif
behavior.HostControl = owner;
region.Behaviors.Add(DialogActivationBehavior.BehaviorKey, behavior);
RegionMngr.Regions.Add(regionName, region);
}
}
示例10: PosViewModel
public PosViewModel(IRegionManager regionManager, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
ITicketService ticketService, IUserService userService, ICacheService cacheService, TicketListViewModel ticketListViewModel,
TicketTagListViewModel ticketTagListViewModel, MenuItemSelectorViewModel menuItemSelectorViewModel, MenuItemSelectorView menuItemSelectorView,
TicketViewModel ticketViewModel, TicketOrdersViewModel ticketOrdersViewModel,TicketEntityListViewModel ticketEntityListViewModel)
{
_ticketService = ticketService;
_userService = userService;
_cacheService = cacheService;
_applicationState = applicationState;
_applicationStateSetter = applicationStateSetter;
_regionManager = regionManager;
_menuItemSelectorView = menuItemSelectorView;
_ticketViewModel = ticketViewModel;
_ticketOrdersViewModel = ticketOrdersViewModel;
_menuItemSelectorViewModel = menuItemSelectorViewModel;
_ticketListViewModel = ticketListViewModel;
_ticketTagListViewModel = ticketTagListViewModel;
_ticketEntityListViewModel = ticketEntityListViewModel;
EventServiceFactory.EventService.GetEvent<GenericEvent<Ticket>>().Subscribe(OnTicketEventReceived);
EventServiceFactory.EventService.GetEvent<GenericEvent<SelectedOrdersData>>().Subscribe(OnSelectedOrdersChanged);
EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnTicketEvent);
EventServiceFactory.EventService.GetEvent<GenericEvent<ScreenMenuItemData>>().Subscribe(OnMenuItemSelected);
EventServiceFactory.EventService.GetEvent<GenericIdEvent>().Subscribe(OnTicketIdPublished);
EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<Entity>>>().Subscribe(OnEntitySelectedForTicket);
EventServiceFactory.EventService.GetEvent<GenericEvent<TicketTagGroup>>().Subscribe(OnTicketTagSelected);
EventServiceFactory.EventService.GetEvent<GenericEvent<TicketStateData>>().Subscribe(OnTicketStateSelected);
EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(OnDepartmentChanged);
}
示例11: AddQuestionView
public AddQuestionView(AddQuestionViewModel viewModel, IRegionManager regionManager)
{
_regionManager = regionManager;
ViewModel = viewModel;
DataContext = this.ViewModel;
InitializeComponent();
}
示例12: PartyAccountabilitySelectorViewModel
public PartyAccountabilitySelectorViewModel(IEventAggregator eventAggregator, IMdmService entityService, IRegionManager regionManager)
{
this.eventAggregator = eventAggregator;
this.entityService = entityService;
this.regionManager = regionManager;
this.AsOf = SystemTime.UtcNow().Date;
}
示例13: BillingModule
/// <summary>
/// Initializes a new instance of the <see cref="BillingModule"/> class.
/// </summary>
/// <param name="accessControlManager">The access control manager.</param>
/// <param name="container">The container.</param>
/// <param name="regionManager">The region manager.</param>
/// <param name="currentUserContextService">The current user context service.</param>
/// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
/// <param name="eventAggregator">The event aggregator.</param>
public BillingModule(
IAccessControlManager accessControlManager,
IUnityContainer container,
IRegionManager regionManager,
ICurrentUserContextService currentUserContextService,
IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
IEventAggregator eventAggregator )
{
_accessControlManager = accessControlManager;
_container = container;
_regionManager = regionManager;
_asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
_eventAggregator = eventAggregator;
//This is temporary until the main navigation dropdown is fixed
currentUserContextService.RegisterForContext (
( u, b ) =>
{
if ( u != null )
{
_agencyKey = u.Agency.Key;
HandleCheckBillingOffice ();
}
},
true );
}
示例14: PageStartMenuViewModel
public PageStartMenuViewModel(IRegionManager regionManager, ITaskDialogService taskDialog)
{
_regionManager = regionManager;
_taskDialog = taskDialog;
NavigateCommand = new DelegateCommand<Uri>(Navigate);
ExitCommand = new DelegateCommand<Window>(ExitGame);
}
示例15: ResourceUseCase
public ResourceUseCase(
// Get the ViewToRegionBinder that the baseclass needs
IViewToRegionBinder viewtoToRegionBinder
, IRegionManager regionManager
, IUnityContainer container
, IEventAggregator eventAggregator
// Get the factories that can create the viewmodels
, ObjectFactory<ResourceListViewModel> resourceViewModel
, ObjectFactory<ResourceToolbarViewModel> resourceToolbarViewModel
, IApplicationModel applicationModel
, IModelVisualizationRegistry modelVisualizationRegistry)
: base(viewtoToRegionBinder)
{
this.ApplicationModel = applicationModel;
this.Container = container;
// Just before the view is initialized for the first time
this.AddInitializationMethods(
// Create the emailViewModel and assign it to this variable
() => this._resourceListViewModel = resourceViewModel.CreateInstance()
, () => this._resourceToolbarViewModel = resourceToolbarViewModel.CreateInstance());
// Register visualizations for these view models. This means: whenever a viewmodel is displayed,
// use this type of view to visualize it.
modelVisualizationRegistry.Register<ResourceListViewModel, ResourceListView>();
modelVisualizationRegistry.Register<ResourceToolbarViewModel, ResourceToolbarView>();
modelVisualizationRegistry.Register<ResourceEditViewModel, ResourceEditView>();
container.RegisterType<IResourceAssignService, ResourceAssignmentService>(new ContainerControlledLifetimeManager());
container.RegisterInstance(container.Resolve<IResourceAssignService>());
regionManager.RegisterViewWithRegion("ResourceEditRegion", typeof(ResourceEditViewModel));
// watch for OpenResourceEvents fired by (Link)Button command in ProjectEditViewModel...
eventAggregator.GetEvent<OpenResourceByIdEvent>().Subscribe(OpenResourceById);
}