本文整理汇总了C#中IDialogService类的典型用法代码示例。如果您正苦于以下问题:C# IDialogService类的具体用法?C# IDialogService怎么用?C# IDialogService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IDialogService类属于命名空间,在下文中一共展示了IDialogService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainViewModel
public MainViewModel(IDialogService dialogService, IErrorService errorService)
{
_dialogService = dialogService;
_errorService = errorService;
OpenFileCommand = new RelayCommand(OpenFile);
_showScoreInfoCommand = new RelayCommand(ShowScoreInfo, () => _score != null);
}
示例2: MainWindowViewModel
public MainWindowViewModel(IDialogService dialogService)
{
this.dialogService = dialogService;
ImplicitShowDialogCommand = new RelayCommand(ImplicitShowDialog);
ExplicitShowDialogCommand = new RelayCommand(ExplicitShowDialog);
}
示例3: ImportService
public ImportService(IProjectService projectService, IDialogService dialogService, IBusyService busyService, IAnalysisService analysisService)
{
_projectService = projectService;
_dialogService = dialogService;
_busyService = busyService;
_analysisService = analysisService;
}
示例4: OpenFileTabContentViewModel
public OpenFileTabContentViewModel(IDialogService dialogService)
{
this.dialogService = dialogService;
openFileCommand = ReactiveCommand.Create();
openFileCommand.Subscribe(_ => OpenFile());
}
示例5: ProposalsListViewModel
public ProposalsListViewModel(
[Import]IBackgroundExecutor executor,
[Import]IEventAggregator eventAggregator,
[Import]IDialogService dialogs,
[Import]IAuthorizationService authorizator,
[Import]IBacklogService backlogService,
[Import]IProposalsService proposalsService)
{
this.executor = executor;
this.dialogs = dialogs;
this.aggregator = eventAggregator;
this.authorizator = authorizator;
this.proposalsService = proposalsService;
this.backlogService = backlogService;
this.aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, OnViewProjectDetails);
this.aggregator.Subscribe(ScrumFactoryEvent.RoleHourCostsChanged, LoadProposals);
this.aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);
this.aggregator.Subscribe(ScrumFactoryEvent.ApplicationWhentBackground, () => { ShowValues = false; });
OnLoadCommand = new DelegateCommand(CanSeeProposals, () => {
ShowValues = false;
if (NeedRefresh) LoadProposals();
});
AddProposalCommand = new DelegateCommand(CanSeeProposals, AddProposal);
ShowDetailCommand = new DelegateCommand<Proposal>(CanSeeProposals, ShowDetail);
ShowHourCostsCommand = new DelegateCommand(CanSeeProposals, ShowHourCosts);
}
示例6: AuthenticateDialogViewModel
public AuthenticateDialogViewModel(ICrunchFacade crunchFacade, IDialogService dialogService)
{
_crunchFacade = crunchFacade;
_dialogService = dialogService;
Title = "Connect to Crunch";
}
示例7: AppSettingEdit_ViewModel_WPF
public AppSettingEdit_ViewModel_WPF(
ILogger Logger_,
INavigationService NavigationService_,
IDialogService DialogService_,
EFDbConnect EFDbConnect_)
{
if (!IsInDesignModeNet())
{
Logger = Logger_;
NavigationService = NavigationService_;
DialogService = DialogService_;
EFDbConnect = EFDbConnect_;
Languages = new ObservableCollection<Language>(EFDbConnect.Table<Language>().ToList());
LearningWordStrategies = new ObservableCollection<LearningWordStrategy>(EFDbConnect.Table<LearningWordStrategy>().ToList());
CommandDispatcher = new MvxCommand<string>(CmdDispatcher);
}
if (IsInDesignModeNet())
{
Languages = new ObservableCollection<Language>();
Languages.Add(new Language() {Code="en",Name="English"});
Languages.Add(new Language() {Code="ru",Name="Русский"});
Languages.Add(new Language() {Code="ua",Name="Українська мова"});
Languages[0].DictionariesCollection.Add(new Dictionary {Name="First dictionary" });
Languages[0].DictionariesCollection.Add(new Dictionary {Name="Ordinary dict" });
Languages[0].DictionariesCollection.Add(new Dictionary {Name="My dictionary" });
CurrentLanguage = Languages[0];
}
}
示例8: AppSettingEdit_ViewModel
public AppSettingEdit_ViewModel(ILogger Logger_, INavigationService NavigationService_, IDialogService DialogService_, ITranslate TranslateService_)
{
if (!IsInDesignMode)
{
Logger = Logger_;
NavigationService = NavigationService_;
DialogService = DialogService_;
Languages = ViewModelLocator.Instance.Languages;
LearningWordStrategies = new ObservableCollection<LearningWordStrategy>(ViewModelLocator.Instance.DataBase.Set<LearningWordStrategy>().ToList());
}
CommandDispatcher = new RelayCommand<string>(CmdDispatcher);
if (IsInDesignMode)
{
Languages = new ObservableCollection<Language>();
Languages.Add(new Language() {Code="en",Name="English"});
Languages.Add(new Language() {Code="ru",Name="Русский"});
Languages.Add(new Language() {Code="ua",Name="Українська мова"});
Languages[0].DictionariesCollection.Add(new Dictionary {name="First dictionary" });
Languages[0].DictionariesCollection.Add(new Dictionary {name="Ordinary dict" });
Languages[0].DictionariesCollection.Add(new Dictionary {name="My dictionary" });
CurrentLanguage = Languages[0];
}
}
示例9: OpenDatabaseViewModel
public OpenDatabaseViewModel(
INavigationService navigationService,
IDatabaseInfoRepository databaseInfoRepository,
ICanSHA256Hash hasher,
IDialogService dialogService,
IPWDatabaseDataSource databaseSource,
ICache cache)
{
_cache = cache;
_databaseSource = databaseSource;
_dialogService = dialogService;
_databaseInfoRepository = databaseInfoRepository;
_hasher = hasher;
_navigationService = navigationService;
var canHitOpen = this.WhenAny(
vm => vm.Password,
vm => vm.KeyFileName,
(p, k) => !string.IsNullOrEmpty(p.Value) || !string.IsNullOrEmpty(k.Value));
OpenCommand = new ReactiveCommand(canHitOpen);
OpenCommand.Subscribe(OpenDatabase);
GetKeyFileCommand = new ReactiveCommand();
GetKeyFileCommand.Subscribe(GetKeyFile);
ClearKeyFileCommand = new ReactiveCommand();
ClearKeyFileCommand.Subscribe(ClearKeyFile);
IObservable<string> keyFileNameChanged = this.WhenAny(vm => vm.KeyFileName, kf => kf.Value);
keyFileNameChanged.Subscribe(v => ClearKeyFileButtonIsVisible = !string.IsNullOrWhiteSpace(v));
keyFileNameChanged.Subscribe(v => GetKeyFileButtonIsVisible = string.IsNullOrWhiteSpace(v));
}
示例10: TaskViewModel
/// <summary>
/// Initializes a new instance of the TaskViewModel class.
/// </summary>
public TaskViewModel(Task model, string listId, IDataService dataService, INavigationService navigationService, IDialogService dialogService)
: base(dataService, navigationService, dialogService)
{
_model = model;
_listId = listId;
update();
}
示例11: BackupViewModel
public BackupViewModel(IBackupManager backupManager,
IDialogService dialogService, IConnectivity connectivity)
{
this.backupManager = backupManager;
this.dialogService = dialogService;
this.connectivity = connectivity;
}
示例12: OwnersListViewModel
public OwnersListViewModel(
[Import]IEventAggregator eventAggregator,
[Import]ITeamService teamServices,
[Import]IBackgroundExecutor backgroundExecutor,
[Import] IDialogService dialogs,
[Import]IAuthorizationService authorizationService)
{
this.aggregator = eventAggregator;
this.teamServices = teamServices;
this.executor = backgroundExecutor;
this.authorizator = authorizationService;
this.dialogs = dialogs;
aggregator.Subscribe(ScrumFactoryEvent.ShowOwnersList, Show);
CloseWindowCommand = new DelegateCommand(CloseWindow);
OnLoadCommand = new DelegateCommand(LoadOwners);
ChangeFactoryOwnerCommand = new DelegateCommand<string>(ChangeFactoryOwner);
ChangeCanSeeProposalsCommand = new DelegateCommand<string>(ChangeCanSeeProposals);
AddNewMemberCommand = new DelegateCommand(AddNewMember);
RefreshMemberFilter = LoadMembers;
}
示例13: GeographicalViewModel
public GeographicalViewModel(IProjectService projectService, IDialogService dialogService, IImportService importService, IImageExportService imageExportService,
GeographicalVarietyViewModel.Factory varietyFactory)
: base("Geographical")
{
_projectService = projectService;
_dialogService = dialogService;
_importService = importService;
_imageExportService = imageExportService;
_varietyFactory = varietyFactory;
_newRegionCommand = new RelayCommand<IEnumerable<Tuple<double, double>>>(AddNewRegion);
_currentClusters = new List<Cluster<Variety>>();
_projectService.ProjectOpened += _projectService_ProjectOpened;
Messenger.Default.Register<ComparisonPerformedMessage>(this, msg => ClusterVarieties());
Messenger.Default.Register<DomainModelChangedMessage>(this, msg =>
{
if (msg.AffectsComparison)
ResetClusters();
if (_selectedRegion != null && (!_varieties.Contains(_selectedRegion.Variety) || !_selectedRegion.Variety.Regions.Contains(_selectedRegion)))
SelectedRegion = null;
});
Messenger.Default.Register<PerformingComparisonMessage>(this, msg => ResetClusters());
_similarityScoreThreshold = 0.7;
TaskAreas.Add(new TaskAreaCommandGroupViewModel("Similarity metric",
new TaskAreaCommandViewModel("Lexical", new RelayCommand(() => SimilarityMetric = SimilarityMetric.Lexical)),
new TaskAreaCommandViewModel("Phonetic", new RelayCommand(() => SimilarityMetric = SimilarityMetric.Phonetic))));
TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks",
new TaskAreaCommandViewModel("Import regions", new RelayCommand(ImportRegions)),
new TaskAreaCommandViewModel("Export this map", new RelayCommand(Export))));
}
示例14: PersonDirectoryViewModel
public PersonDirectoryViewModel(IPersonService personService, IDispatcher dispatcher, IEventAggregator aggregator, IDialogService dialogService)
: base(personService, dispatcher, aggregator, dialogService)
{
personDirectory = new RangeEnabledObservableCollection<Person>();
aggregator.GetEvent<PersonDirectoryUpdatedEvent>().Subscribe(OnPersonDirectoryUpdated, ThreadOption.BackgroundThread);
aggregator.GetEvent<PersonDeletedEvent>().Subscribe(OnPersonDeleted, ThreadOption.UIThread);
}
示例15: MemberViewModel
public MemberViewModel(
[Import(typeof(IAuthorizationService))] IAuthorizationService authorizator,
[Import(typeof(IBackgroundExecutor))] IBackgroundExecutor executor,
[Import(typeof(IEventAggregator))] IEventAggregator aggregator,
[Import] IDialogService dialogs,
[Import(typeof(ITasksService))] ITasksService taskService,
[Import(typeof(ITeamService))] ITeamService teamService)
{
this.taskService = taskService;
this.authorizator = authorizator;
this.executor = executor;
this.aggregator = aggregator;
this.teamService = teamService;
this.dialogs = dialogs;
aggregator.Subscribe(ScrumFactoryEvent.ShowProfile, Show);
aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);
ChangeAvatarCommand = new DelegateCommand(ChangeMemberImage);
RemoveAvatarCommand = new DelegateCommand(RemoveMemberImage);
CloseWindowCommand = new DelegateCommand(Close);
CreateAvatarCommand = new DelegateCommand(CreateAvatar);
UpdateAvatarCommand = new DelegateCommand(() => {
executor.StartBackgroundTask(
() => {
teamService.UpdateMember(authorizator.SignedMemberProfile.MemberUId, MemberProfile);
}, () => {
myProfileNocache = new Random().Next().ToString();
DefineMemberAvatarUrl();
});
});
}