当前位置: 首页>>代码示例>>C#>>正文


C# IDialogService类代码示例

本文整理汇总了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);
 }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:7,代码来源:MainViewModel.cs

示例2: MainWindowViewModel

        public MainWindowViewModel(IDialogService dialogService)
        {
            this.dialogService = dialogService;

            ImplicitShowDialogCommand = new RelayCommand(ImplicitShowDialog);
            ExplicitShowDialogCommand = new RelayCommand(ExplicitShowDialog);
        }
开发者ID:Rivolvan,项目名称:mvvm-dialogs,代码行数:7,代码来源:MainWindowViewModel.cs

示例3: ImportService

 public ImportService(IProjectService projectService, IDialogService dialogService, IBusyService busyService, IAnalysisService analysisService)
 {
     _projectService = projectService;
     _dialogService = dialogService;
     _busyService = busyService;
     _analysisService = analysisService;
 }
开发者ID:rmunn,项目名称:cog,代码行数:7,代码来源:ImportService.cs

示例4: OpenFileTabContentViewModel

 public OpenFileTabContentViewModel(IDialogService dialogService)
 {
     this.dialogService = dialogService;
     
     openFileCommand = ReactiveCommand.Create();
     openFileCommand.Subscribe(_ => OpenFile());
 }
开发者ID:402214782,项目名称:mvvm-dialogs,代码行数:7,代码来源:OpenFileTabContentViewModel.cs

示例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);
        }
开发者ID:klot-git,项目名称:scrum-factory,代码行数:31,代码来源:ProposalsListViewModel.cs

示例6: AuthenticateDialogViewModel

        public AuthenticateDialogViewModel(ICrunchFacade crunchFacade, IDialogService dialogService)
        {
            _crunchFacade = crunchFacade;
            _dialogService = dialogService;

            Title = "Connect to Crunch";
        }
开发者ID:samueldjack,项目名称:CrunchAPIExplorer,代码行数:7,代码来源:AuthenticateDialogViewModel.cs

示例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];
            }

        }
开发者ID:vlkam,项目名称:OpenLearningPlayer,代码行数:35,代码来源:AppSettingEdit_ViewModel_WPF.cs

示例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];
            }

        }
开发者ID:KamT,项目名称:OpenLearningPlayer,代码行数:30,代码来源:AppSettingEdit_ViewModel.cs

示例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));
        }
开发者ID:TheAngryByrd,项目名称:MetroPass,代码行数:32,代码来源:OpenDatabaseViewModel.cs

示例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();
 }
开发者ID:roosi,项目名称:done,代码行数:10,代码来源:TaskViewModel.cs

示例11: BackupViewModel

 public BackupViewModel(IBackupManager backupManager,
     IDialogService dialogService, IConnectivity connectivity)
 {
     this.backupManager = backupManager;
     this.dialogService = dialogService;
     this.connectivity = connectivity;
 }
开发者ID:Rumpel78,项目名称:MoneyFox.Windows,代码行数:7,代码来源:BackupViewModel.cs

示例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;
        }
开发者ID:klot-git,项目名称:scrum-factory,代码行数:26,代码来源:OwnersListViewModel.cs

示例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))));
        }
开发者ID:rmunn,项目名称:cog,代码行数:34,代码来源:GeographicalViewModel.cs

示例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);
		}
开发者ID:yovannyr,项目名称:mvvm-unittesting,代码行数:7,代码来源:PersonDirectoryViewModel.cs

示例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();
                });
            });
        }
开发者ID:klot-git,项目名称:scrum-factory,代码行数:33,代码来源:MemberViewModel.cs


注:本文中的IDialogService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。