本文整理汇总了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));
}
}
示例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);
}
示例3: SelectionController
public SelectionController(ISelectionService selectionService, ITickerRepository tickerRepository, ITimeFrameRepository timeFrameRepository, IStrategyInfoRepository strategyInfoRepository)
{
this.selectionService = selectionService;
this.tickerRepository = tickerRepository;
this.timeFrameRepository = timeFrameRepository;
this.strategyInfoRepository = strategyInfoRepository;
}
示例4: GetService
private void GetService ()
{
selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
if (selectionService != null)
{
selectionService.SelectionChanged += OnSelectionChanged;
}
}
示例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>();
}
示例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;
}
示例7: GraphicsPixelHistoryViewModel
public GraphicsPixelHistoryViewModel(ISelectionService selectionService)
{
DisplayName = "Pixel History";
_selectionService = selectionService;
_pixelEvents = new BindableCollection<PixelHistoryEventViewModel>();
selectionService.SelectedPixelChanged += OnSelectedPixelChanged;
}
示例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));
}
示例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);
}
示例10: Next
public override void Next(ISelectionService selection)
{
if (Finishing()) return;
WizardEventArgs args;
if (UserAllowsMoveToProceed(Direction.Forward, out args) && _wizard.MoreThanOnePageExists())
{
MoveToNextPage(args);
SetButtonStates();
}
}
示例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);
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
}
示例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) => {
};
}
}