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


C# ISelectionService类代码示例

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


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

示例1: CommandSet

 public CommandSet(ISite site)
 {
     this.site = site;
     this.eventService = (IEventHandlerService) site.GetService(typeof(IEventHandlerService));
     this.eventService.EventHandlerChanged += new EventHandler(this.OnEventHandlerChanged);
     IDesignerHost host = (IDesignerHost) site.GetService(typeof(IDesignerHost));
     if (host != null)
     {
         host.Activated += new EventHandler(this.UpdateClipboardItems);
     }
     this.statusCommandUI = new StatusCommandUI(site);
     IUIService uiService = site.GetService(typeof(IUIService)) as IUIService;
     this.commandSet = new CommandSetItem[] {
         new CommandSetItem(this, new EventHandler(this.OnStatusDelete), new EventHandler(this.OnMenuDelete), StandardCommands.Delete, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusCopy), new EventHandler(this.OnMenuCopy), StandardCommands.Copy, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusCut), new EventHandler(this.OnMenuCut), StandardCommands.Cut, uiService), new ImmediateCommandSetItem(this, new EventHandler(this.OnStatusPaste), new EventHandler(this.OnMenuPaste), StandardCommands.Paste, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusSelectAll), new EventHandler(this.OnMenuSelectAll), StandardCommands.SelectAll, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAlways), new EventHandler(this.OnMenuDesignerProperties), MenuCommands.DesignerProperties, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAlways), new EventHandler(this.OnKeyCancel), MenuCommands.KeyCancel, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAlways), new EventHandler(this.OnKeyCancel), MenuCommands.KeyReverseCancel, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusPrimarySelection), new EventHandler(this.OnKeyDefault), MenuCommands.KeyDefaultAction, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyMoveUp, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyMoveDown, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyMoveLeft, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyMoveRight, true), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyNudgeUp, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyNudgeDown, true, uiService), new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyNudgeLeft, true, uiService),
         new CommandSetItem(this, new EventHandler(this.OnStatusAnySelection), new EventHandler(this.OnKeyMove), MenuCommands.KeyNudgeRight, true, uiService)
      };
     this.selectionService = (ISelectionService) site.GetService(typeof(ISelectionService));
     if (this.selectionService != null)
     {
         this.selectionService.SelectionChanged += new EventHandler(this.OnSelectionChanged);
     }
     this.menuService = (IMenuCommandService) site.GetService(typeof(IMenuCommandService));
     if (this.menuService != null)
     {
         for (int i = 0; i < this.commandSet.Length; i++)
         {
             this.menuService.AddCommand(this.commandSet[i]);
         }
     }
     IDictionaryService service = site.GetService(typeof(IDictionaryService)) as IDictionaryService;
     if (service != null)
     {
         service.SetValue(typeof(CommandID), new CommandID(new Guid("BA09E2AF-9DF2-4068-B2F0-4C7E5CC19E2F"), 0));
     }
 }
开发者ID:Reegenerator,项目名称:Sample-CustomizeDatasetCS,代码行数:35,代码来源:CommandSet.cs

示例2: SelectionUIService

 public SelectionUIService(IDesignerHost host)
 {
     base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.StandardClick | ControlStyles.Opaque, true);
     this.host = host;
     this.dragHandler = null;
     this.dragComponents = null;
     this.selectionItems = new Hashtable();
     this.selectionHandlers = new Hashtable();
     this.AllowDrop = true;
     this.Text = "SelectionUIOverlay";
     this.selSvc = (ISelectionService) host.GetService(typeof(ISelectionService));
     if (this.selSvc != null)
     {
         this.selSvc.SelectionChanged += new EventHandler(this.OnSelectionChanged);
     }
     host.TransactionOpened += new EventHandler(this.OnTransactionOpened);
     host.TransactionClosed += new DesignerTransactionCloseEventHandler(this.OnTransactionClosed);
     if (host.InTransaction)
     {
         this.OnTransactionOpened(host, EventArgs.Empty);
     }
     IComponentChangeService service = (IComponentChangeService) host.GetService(typeof(IComponentChangeService));
     if (service != null)
     {
         service.ComponentRemoved += new ComponentEventHandler(this.OnComponentRemove);
         service.ComponentChanged += new ComponentChangedEventHandler(this.OnComponentChanged);
     }
     SystemEvents.DisplaySettingsChanged += new EventHandler(this.OnSystemSettingChanged);
     SystemEvents.InstalledFontsChanged += new EventHandler(this.OnSystemSettingChanged);
     SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(this.OnUserPreferenceChanged);
 }
开发者ID:Reegenerator,项目名称:Sample-CustomizeDatasetCS,代码行数:31,代码来源:SelectionUIService.cs

示例3: SelectionController

 public SelectionController(ISelectionService selectionService, ITickerRepository tickerRepository, ITimeFrameRepository timeFrameRepository, IStrategyInfoRepository strategyInfoRepository)
 {
     this.selectionService = selectionService;
     this.tickerRepository = tickerRepository;
     this.timeFrameRepository = timeFrameRepository;
     this.strategyInfoRepository = strategyInfoRepository;
 }
开发者ID:Rizjiy,项目名称:RMarketMVC,代码行数:7,代码来源:SelectionController.cs

示例4: GetService

		private void GetService ()
		{
			selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			if (selectionService != null)
			{
				selectionService.SelectionChanged += OnSelectionChanged;
			}
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:8,代码来源:RowItemDesigner.cs

示例5: MusicPropertiesController

 public MusicPropertiesController(IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService, Lazy<MusicPropertiesViewModel> musicPropertiesViewModel)
 {
     this.shellService = shellService;
     this.musicFileContext = musicFileContext;
     this.selectionService = selectionService;
     this.musicPropertiesViewModel = musicPropertiesViewModel;
     this.musicFilesToSaveAfterPlaying = new HashSet<MusicFile>();
 }
开发者ID:electrobreath,项目名称:musicmanager,代码行数:8,代码来源:MusicPropertiesController.cs

示例6: Initialize

 public override void Initialize(System.ComponentModel.IComponent component)
 {
     base.Initialize(component);
     SelectionService = GetService(typeof(ISelectionService)) as ISelectionService;
     SelectionService.SelectionChanged += OnComponentSelected;
     ComponentChangeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
     ComponentChangeService.ComponentRename += OnComponentRename;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:AbstractDesigner.cs

示例7: GraphicsPixelHistoryViewModel

		public GraphicsPixelHistoryViewModel(ISelectionService selectionService)
		{
		    DisplayName = "Pixel History";

			_selectionService = selectionService;
			_pixelEvents = new BindableCollection<PixelHistoryEventViewModel>();
			selectionService.SelectedPixelChanged += OnSelectedPixelChanged;
		}
开发者ID:modulexcite,项目名称:rasterizr,代码行数:8,代码来源:GraphicsPixelHistoryViewModel.cs

示例8: GraphicsEventListViewModel

		public GraphicsEventListViewModel(ISelectionService selectionService)
		{
		    DisplayName = "Graphics Event List";

			_selectionService = selectionService;
			_events = new BindableCollection<TracefileEventViewModel>();
			selectionService.SelectedFrameChanged += OnSelectedFrameChanged;
			OnSelectedFrameChanged(this, new TracefileFrameChangedEventArgs(selectionService.SelectedFrame));
		}
开发者ID:modulexcite,项目名称:rasterizr,代码行数:9,代码来源:GraphicsEventListViewModel.cs

示例9: GraphicsObjectTableViewModel

        public GraphicsObjectTableViewModel(ISelectionService selectionService)
		{
		    DisplayName = "Graphics Object Table";

			_selectionService = selectionService;
            _objects = new BindableCollection<GraphicsObjectViewModel>();
			selectionService.SelectedEventChanged += OnSelectedEventChanged;

            if (_selectionService.SelectedFrame != null && _selectionService.SelectedEvent != null)
                OnSelectedEventChanged(this, null);
		}
开发者ID:modulexcite,项目名称:rasterizr,代码行数:11,代码来源:GraphicsObjectTableViewModel.cs

示例10: Next

        public override void Next(ISelectionService selection)
        {
            if (Finishing()) return;

            WizardEventArgs args;

            if (UserAllowsMoveToProceed(Direction.Forward, out args) && _wizard.MoreThanOnePageExists())
            {
                MoveToNextPage(args);
                SetButtonStates();
            }
        }
开发者ID:SteveBate,项目名称:AdvancedWizard,代码行数:12,代码来源:RuntimeWizard.cs

示例11: GraphicsPipelineStagesViewModel

        public GraphicsPipelineStagesViewModel(ISelectionService selectionService)
		{
		    DisplayName = "Graphics Pipeline Stages";

            _inputAssemblerOutputs = new BindableCollection<VertexViewModel>();

			_selectionService = selectionService;
			selectionService.SelectedEventChanged += OnSelectedEventChanged;

            if (_selectionService.SelectedFrame != null && _selectionService.SelectedEvent != null)
                OnSelectedEventChanged(this, null);
		}
开发者ID:modulexcite,项目名称:rasterizr,代码行数:12,代码来源:GraphicsPipelineStagesViewModel.cs

示例12: GetService

		private void GetService ()
		{
			selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			if (selectionService != null)
			{
				selectionService.SelectionChanged += OnSelectionChanged;
			}
			
			componentChangeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
			if (componentChangeService != null) {
				componentChangeService.ComponentRename += new ComponentRenameEventHandler(OnComponentRename);
			}
		}
开发者ID:Rpinski,项目名称:SharpDevelop,代码行数:13,代码来源:GroupeHeaderDesigner.cs

示例13: Initialize

        public override void Initialize(IComponent component)
        {
            base.Initialize(component);

            if (Control is SettingsTree)
            {
                designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
                menuService = GetService(typeof(IMenuCommandService)) as IMenuCommandService;
                selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
                settingsTree = Control as SettingsTree;
                settingsTree.TreeView.AfterSelect += OnNodeSelect;
            }


        }
开发者ID:ByteSempai,项目名称:Ubiquitous,代码行数:15,代码来源:SetupTreeDesigner.cs

示例14: Initialize

 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
     if (component.Site != null)
     {
         this.selectionService = this.GetService(typeof(ISelectionService)) as ISelectionService;
         this.behaviorService = this.GetService(typeof(BehaviorService)) as BehaviorService;
         if ((this.behaviorService != null) && (this.selectionService != null))
         {
             this.behavior = new FilterCutCopyPasteDeleteBehavior(true, this.behaviorService);
             this.UpdateBehavior();
             this.selectionService.SelectionChanged += new EventHandler(this.selectionService_SelectionChanged);
         }
     }
 }
开发者ID:BachelorEric,项目名称:ModelFirst,代码行数:15,代码来源:FilterColumnDesigner.cs

示例15: GetService

        void GetService()
        {
            selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
            if (selectionService != null)
            {
                selectionService.SelectionChanged += OnSelectionChanged;
            }

            componentChangeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
            if (componentChangeService != null) {
                componentChangeService.ComponentRename += OnComponentRename;
                componentChangeService.ComponentAdding += (sender, e) => {
                };
            }
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:15,代码来源:ContainerDesigner.cs


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