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


C# IApplicationCommands类代码示例

本文整理汇总了C#中IApplicationCommands的典型用法代码示例。如果您正苦于以下问题:C# IApplicationCommands类的具体用法?C# IApplicationCommands怎么用?C# IApplicationCommands使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IApplicationCommands类属于命名空间,在下文中一共展示了IApplicationCommands类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FlyoutService

        public FlyoutService(IRegionManager regionManager, IApplicationCommands applicationCommands)
        {
            _regionManager = regionManager;

            ShowFlyoutCommand = new DelegateCommand<string>(ShowFlyout, CanShowFlyout);
            applicationCommands.ShowFlyoutCommand.RegisterCommand(ShowFlyoutCommand);
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:7,代码来源:FlyoutService.cs

示例2: ShellViewModel

        public ShellViewModel(
            IRegionManager regionManager, 
            IEventAggregator eventAggregator, 
            INavigationService navigationService, 
            IApplicationCommands applicationCommands, 
            LogWriter logWriter)
        {
            this.regionManager = regionManager;
            this.eventAggregator = eventAggregator;
            this.navigationService = navigationService;
            this.applicationCommands = applicationCommands;
            this.logWriter = logWriter;
            this.EntitySelectorViews = new List<KeyValuePair<string, Type>>();
            this.ExitCommand = new DelegateCommand<object>(this.AppExit, this.CanAppExit);
            this.eventAggregator.Subscribe<BusyEvent>(this.SetBusy);
            this.eventAggregator.Subscribe<DialogOpenEvent>(this.DialogOpened);
            this.eventAggregator.Subscribe<StatusEvent>(this.UpdateStatus);
            this.eventAggregator.Subscribe<ErrorEvent>(this.ShowError);
            this.eventAggregator.Subscribe<CanSaveEvent>(this.UpdateCanSave);
            this.eventAggregator.Subscribe<EntitySelectEvent>(this.ShowSelectEntity);
            this.eventAggregator.Subscribe<EntitySelectedEvent>(this.HideSelectEntity);
            this.eventAggregator.Subscribe<MappingUpdateEvent>(this.ShowUpdateMapping);
            this.eventAggregator.Subscribe<MappingUpdatedEvent>(this.HideUpdateMapping);
            this.eventAggregator.Subscribe<CanCreateNewChangeEvent>(this.CanCreateNewChange);
            this.eventAggregator.Subscribe<CanCloneChangeEvent>(this.CanCloneChange);
            this.eventAggregator.Subscribe<ConfirmMappingDeleteEvent>(this.ConfirmMappingDelete);
            this.eventAggregator.Subscribe<MappingDeleteConfirmedEvent>(this.MappingDeleteConfirmed);
            this.NewEntityMenuItems = new ObservableCollection<MenuItemViewModel>();

            this.serverList = new ObservableCollection<string>();
            this.SetServerList();

            this.HelpToolTip = "Help Documentation (" + Assembly.GetExecutingAssembly().GetName().Version + ")";
        }
开发者ID:RaoulHolzer,项目名称:EnergyTrading-MDM-Sample,代码行数:34,代码来源:ShellViewModel.cs

示例3: InvokePatternWrapper

 /// -------------------------------------------------------------------
 /// <summary></summary>
 /// -------------------------------------------------------------------
 internal InvokePatternWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
     :
     base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands)
 {
     Comment("Calling GetPattern(InvokePattern) on " + Library.GetUISpyLook(element));
     m_pattern = (InvokePattern)GetPattern(m_le, m_useCurrent, InvokePattern.Pattern);
 }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:10,代码来源:InvokeTests.cs

示例4: ScrollItemPatternWrapper

        /// -------------------------------------------------------------------
        /// <summary></summary>
        /// -------------------------------------------------------------------
        internal ScrollItemPatternWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
            :
            base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands)
        {
            Comment("Creating ScrollItemTests");

            _pattern = (ScrollItemPattern)GetPattern(m_le, m_useCurrent, ScrollItemPattern.Pattern);
            if (_pattern == null)
                ThrowMe(CheckType.IncorrectElementConfiguration, Helpers.PatternNotSupported + ": ScrollItemPattern");

            // Find the ScrollPattern
            _container = m_le;

            while (_container != null && !(bool)_container.GetCurrentPropertyValue(AutomationElement.IsScrollPatternAvailableProperty))
                _container = TreeWalker.ControlViewWalker.GetParent(_container);

            // Check to see if we actual found the container of the scrollitem
            if (_container == null)
                ThrowMe(CheckType.IncorrectElementConfiguration, "Element does not have a container with ScrollPattern");

            Comment("Found scroll container: " + Library.GetUISpyLook(_container));

            _scrollPattern = (ScrollPattern)_container.GetCurrentPattern(ScrollPattern.Pattern) as ScrollPattern;

        }
开发者ID:jeffras,项目名称:uiverify,代码行数:28,代码来源:ScrollItemTests.cs

示例5: LeftMenuService

        public LeftMenuService(IServiceLocator serviceLocator, IApplicationCommands commands)
        {
            this.commands = commands;
            this.serviceLocator = serviceLocator;

            MenuItems = new ObservableCollection<IMenuViewItem>();
        }
开发者ID:punker76,项目名称:VCA-player,代码行数:7,代码来源:LeftMenuService.cs

示例6: PersonDetailsViewModel

        public PersonDetailsViewModel(
            IEventAggregator eventAggregator,
            IPersonRepository repository,
            IApplicationCommands applicationCommands,
            IRegionManager regionManager)
        {
            this.regionManager = regionManager;
            this.eventAggregator = eventAggregator;
            this.repository = repository;
            this.SaveConfirmation = new InteractionRequest<IConfirmation>();
            ;

            eventAggregator.GetEvent<PersonSelectionEvent>()
                .Subscribe(this.OnPersonSelected, ThreadOption.PublisherThread);

            this.CreateNewCommand = new DelegateCommand(() => this.SelectedPerson = new Person());
            applicationCommands.NewCommand.RegisterCommand(this.CreateNewCommand);

            this.SaveCommand = new DelegateCommand(this.Save, this.CanSave);
            applicationCommands.SaveCommand.RegisterCommand(this.SaveCommand);

            this.GenerateNumbersCommand = new DelegateCommand(this.GenerateNumbers);

            this.ShowAnalyzationCommand = new DelegateCommand(this.ShowAnalyzation);
        }
开发者ID:HerrLoesch,项目名称:Prism6Examples,代码行数:25,代码来源:PersonDetailsViewModel.cs

示例7: ShellTitlebarRightWindowCommandsViewModel

        /// <summary>
        /// CTOR
        /// </summary>
        public ShellTitlebarRightWindowCommandsViewModel(IApplicationCommands applicationCommands)
        {
            this.ShowApplicationHelpCommand = new DelegateCommand(this.ShowApplicationHelp);
            this.ShowApplicationInfoCommand = new DelegateCommand(this.ShowApplicationInfo);

            applicationCommands.ShowApplicationHelpCommand.RegisterCommand(this.ShowApplicationHelpCommand);
            applicationCommands.ShowApplicationInfoCommand.RegisterCommand(this.ShowApplicationInfoCommand);
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:11,代码来源:ShellTitlebarRightWindowCommandsViewModel.cs

示例8: MultipleViewTests

		/// -------------------------------------------------------------------
		/// <summary></summary>
		/// -------------------------------------------------------------------
		public MultipleViewTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
            :
            base(element, TestSuite, priority, typeOfControl, TypeOfPattern.MultipleView, dirResults, testEvents, commands)
        {
            m_pattern = (MultipleViewPattern)element.GetCurrentPattern(MultipleViewPattern.Pattern);
            if (m_pattern == null)
                throw new Exception(Helpers.PatternNotSupported);
        }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:11,代码来源:MultipleViewTests.cs

示例9: TableItemTests

		/// -------------------------------------------------------------------
		/// <summary>
        /// Get the TableItemPattern on the element
        /// </summary>
		/// -------------------------------------------------------------------
		public TableItemTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
            :
            base(element, TestSuite, priority, typeOfControl, TypeOfPattern.TableItem, dirResults, testEvents, commands)
        {
            m_pattern = (TableItemPattern)GetPattern(m_le, m_useCurrent, TableItemPattern.Pattern);
            if (m_pattern == null)
                throw new Exception(Helpers.PatternNotSupported);
        }
开发者ID:jeffras,项目名称:uiverify,代码行数:13,代码来源:TableItemTests.cs

示例10: SelectionPatternWrapper

        bool _Contiguous; //calendar only accept contigious selection

        /// -------------------------------------------------------------------
        /// <summary></summary>
        /// -------------------------------------------------------------------
        internal SelectionPatternWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
            :
            base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands)
        {
            _pattern = (SelectionPattern)GetPattern(m_le, m_useCurrent, SelectionPattern.Pattern);

            ControlType ct = m_le.GetCurrentPropertyValue(AutomationElement.ControlTypeProperty) as ControlType;
            _Contiguous = ct == ControlType.Calendar;
        }
开发者ID:TestStack,项目名称:UIAVerify,代码行数:14,代码来源:SelectionTests.cs

示例11: TogglePatternWrapper

        /// -------------------------------------------------------------------
        /// <summary></summary>
        /// -------------------------------------------------------------------
        protected TogglePatternWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
            :
            base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands)
        {
            _pattern = (TogglePattern)element.GetCurrentPattern(TogglePattern.Pattern);

            if (_pattern == null)
                throw new Exception("TogglePattern: " + Helpers.PatternNotSupported);
        }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:12,代码来源:ToggleTests.cs

示例12: ViewBViewModel

        public ViewBViewModel(INavigationService navigationService, IApplicationCommands applicationCommands)
        {
            _navigationService = navigationService;
            NavigateCommand = new DelegateCommand(Navigate).ObservesCanExecute((vm) => CanNavigate);
            SaveCommand = new DelegateCommand(Save);
            ResetCommand = new DelegateCommand(Reset);

            applicationCommands.SaveCommand.RegisterCommand(SaveCommand);
            applicationCommands.ResetCommand.RegisterCommand(ResetCommand);
        }
开发者ID:ethedy,项目名称:Prism,代码行数:10,代码来源:ViewBViewModel.cs

示例13: MenuItemViewModel

 public MenuItemViewModel(
     IApplicationCommands commands, 
     INavigationService navigationService, 
     IEventAggregator eventAggregator)
 {
     this.eventAggregator = eventAggregator;
     this.OpenCommand =
         new DelegateCommand(
             () => commands.OpenView(this.SearchResultsViewType, this.name, RegionNames.MainSearchResultsRegion));
     this.AddEntityCommand = new DelegateCommand(() => navigationService.NavigateMain(this.AddEntityUri));
 }
开发者ID:RaoulHolzer,项目名称:EnergyTrading-MDM-Sample,代码行数:11,代码来源:MenuItemViewModel.cs

示例14: BrokerEditViewModel

 public BrokerEditViewModel(
     IEventAggregator eventAggregator, 
     IMdmService entityService, 
     INavigationService navigationService, 
     IMappingService mappingService, 
     IApplicationCommands applicationCommands)
 {
     this.navigationService = navigationService;
     this.mappingService = mappingService;
     this.applicationCommands = applicationCommands;
     this.eventAggregator = eventAggregator;
     this.entityService = entityService;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
     this.CanEdit = AuthorisationHelpers.HasEntityRights("Broker");
 }
开发者ID:RaoulHolzer,项目名称:EnergyTrading-MDM-Sample,代码行数:15,代码来源:BrokerEditViewModel.cs

示例15: TextScenarioTests

 public TextScenarioTests(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands)
     :
     base(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands)
 {
     try
     {
         _tth = new TextTestsHelper(element, testSuite, priority, TypeOfControl.UnknownControl, TypeOfPattern.Unknown, null, testEvents, commands);
     }
     catch( Exception ex )
     {
         supportsText = false;
         Comment("Unknown exception raised: " + ex.ToString() );
     }
     _NotifiedEvent = new System.Threading.ManualResetEvent(false);
 }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:15,代码来源:Text.cs


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