本文整理汇总了C#中IDialogService.SelectTopMenu方法的典型用法代码示例。如果您正苦于以下问题:C# IDialogService.SelectTopMenu方法的具体用法?C# IDialogService.SelectTopMenu怎么用?C# IDialogService.SelectTopMenu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDialogService
的用法示例。
在下文中一共展示了IDialogService.SelectTopMenu方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MembersListViewModel
public MembersListViewModel(
[Import] IBackgroundExecutor backgroundExecutor,
[Import] IEventAggregator eventAggregator,
[Import] IAuthorizationService authorizator,
[Import] IDialogService dialogService,
[Import] ITeamService teamService,
[Import] IProjectsService projectService)
{
this.aggregator = eventAggregator;
this.executor = backgroundExecutor;
this.authorizator = authorizator;
this.dialogs = dialogService;
this.teamService = teamService;
this.projectService = projectService;
membersViewSource = new System.Windows.Data.CollectionViewSource();
membersViewSource.SortDescriptions.Add(new SortDescription("MemberProfile.FullName", ListSortDirection.Ascending));
membersViewSource.Filter += new FilterEventHandler(membersViewSource_Filter);
delayFilter = new DelayAction(500, new DelayAction.ActionDelegate(() => { if (FilteredMembers != null) FilteredMembers.Refresh(); }));
aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);
aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.ShowMemberDetail,
member => {
dialogs.SelectTopMenu(this);
ShowDetail(member);
});
OnLoadCommand = new DelegateCommand(() => { if (NeedRefresh) LoadMembers(); });
RefreshCommand = new DelegateCommand(LoadMembers);
ShowDetailWindowCommand = new DelegateCommand<MemberViewModel>(ShowDetail);
AddNewMemberCommand = new DelegateCommand(CanAddMember, AddMember);
OnlyActiveMembers = true;
NeedRefresh = true;
}
示例2: ProjectsListViewModel
public ProjectsListViewModel(
[Import] IEventAggregator aggregator,
[Import] IProjectsService projectsService,
[Import] IBackgroundExecutor executor,
[Import] IDialogService dialogs,
[Import] IAuthorizationService authorizator)
{
this.aggregator = aggregator;
this.projectsService = projectsService;
this.executor = executor;
this.dialogs = dialogs;
this.authorizator = authorizator;
projectsViewSource = new System.Windows.Data.CollectionViewSource();
projectsViewSource.SortDescriptions.Add(new SortDescription("Status", ListSortDirection.Ascending));
projectsViewSource.SortDescriptions.Add(new SortDescription("TotalDayAllocation", ListSortDirection.Descending));
projectsViewSource.SortDescriptions.Add(new SortDescription("ProjectNumber", ListSortDirection.Descending));
projectsViewSource.Filter += new System.Windows.Data.FilterEventHandler(FilteredProjects_Filter);
delayFilter = new DelayAction(500, new DelayAction.ActionDelegate(() => {
if (allDataLoaded && FilteredProjects != null) {
FilteredProjects.Refresh();
SetGroupCount();
} else {
LoadProjectList();
}
}));
aggregator.Subscribe<Project>(ScrumFactoryEvent.ProjectStatusChanged, OnProjectStatusChanged);
aggregator.Subscribe<Project>(ScrumFactoryEvent.ProjectCreated, OnProjectCreated);
aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged,
m => {
((DelegateCommand)CreateProjectCommand).NotifyCanExecuteChanged();
if (m == null) {
OnProjectListLoaded(new List<Project>());
SelectedProject = null;
aggregator.Publish<Project>(ScrumFactoryEvent.ViewProjectDetails, SelectedProject);
return;
}
LoadProjectList();
ShowDetailOnInit();
});
aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, p => {
if (SelectedProject != p)
SelectedProject = p;
});
aggregator.Subscribe(ScrumFactoryEvent.CreateNewProject, () => {
dialogs.SelectTopMenu(this);
OpenCreateProjectWindow();
});
aggregator.Subscribe<int>(ScrumFactoryEvent.ProjectArgOnInit, OnProjectArgOnInit);
OnLoadCommand = new DelegateCommand(() => { if (NeedRefresh) LoadProjectList(); });
RefreshProjectListCommand = new DelegateCommand(() => { LoadProjectList(); });
ShowDetailWindowCommand = new DelegateCommand<Project>(p => { ShowDetailWindow(p.ProjectUId); });
CreateProjectCommand = new DelegateCommand(CanCreateProject, OpenCreateProjectWindow);
CopyToClipboardCommand = new DelegateCommand(CopyToClipboard);
LoadMoreCommand = new DelegateCommand(() => { LoadProjectList(false); });
NeedRefresh = true;
}