public override void Execute(IActionContext context) { IResource res = context.SelectedResources[0]; if (res.GetStringProp("DeepName") == Core.FilterRegistry.ViewNameForSearchResults) { SearchCtrl.ShowAdvancedSearchDialog(res); } else { EditViewForm form = new EditViewForm(res); if (form.ShowDialog(Core.MainWindow) == DialogResult.OK) { IResource view = Core.ResourceStore.FindUniqueResource(FilterManagerProps.ViewResName, Core.Props.Name, form.HeadingText); Core.UnreadManager.InvalidateUnreadCounter(view); Core.LeftSidebar.DefaultViewPane.SelectResource(view); } form.Dispose(); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponentSelf() { components = new Container(); using (new LayoutSuspender(this)) { // _barResourceTypeTabs _barResourceTypeTabs = new TabSwitcher(); _barResourceTypeTabs.Font = new Font("Tahoma", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((Byte)(204))); _barResourceTypeTabs.Name = "_barResourceTypeTabs"; _barResourceTypeTabs.TabIndex = 1; _barResourceTypeTabs.Location = new Point(0, 6); _barResourceTypeTabs.Size = new Size(648, 27); _barResourceTypeTabs.SetSite(this); // _barSearch _barSearch = new SearchCtrl(); _barSearch.Name = "_barSearch"; _barSearch.TabIndex = 2; _barSearch.Size = _barSearch.OptimalSize; _barSearch.SetSite(this); _nDesiredToolbarWidth = _barSearch.OptimalSize.Width; // This Control Height = 32; Controls.Add(_barResourceTypeTabs); Controls.Add(_barSearch); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.CacheText | ControlStyles.ContainerControl | ControlStyles.ResizeRedraw | ControlStyles.Selectable | ControlStyles.UserPaint | ControlStyles.Opaque , true); } }
public void Execute(IActionContext context) { SearchCtrl.CreateSearchView(context.SelectedText, false); }