/// <summary> /// Closes UI down. /// <paramref name="apply">Whether to apply or process the selection or not.</paramref> /// </summary> public override void OnClose(bool apply) { _optionsService.SetStringOption(this.Feature, "File", this.FileName); _optionsService.SetStringOption(this.Feature, "Search", _search); _optionsService.SetIntOption(this.Feature, "Filter", (int)this.Filter); if (!apply) { return; } if (this.Selection == null) { return; } var member = this.Selection as MemberCodeModel; if (member == null) { return; } _shellSelectionService.SetActiveFilePosition(member.Line, 1); }
/// <summary> /// Closes UI down. /// <paramref name="apply">Whether to apply or process the selection or not.</paramref> /// </summary> public override void OnClose(bool apply) { _optionsService.SetStringOption(this.Feature, "Solution", this.SolutionName); _optionsService.SetStringOption(this.Feature, "Search", _search); _optionsService.SetBoolOption(this.Feature, "AllFiles", _allFiles); if (!apply) { return; } if ((this.Selection == null) || (this.Selection.Count() == 0)) { return; } if (this.SelectionCode) { _shellHelperService.OpenFiles(this.Selection); if (this.CodeBrowserCommandId > 0) { var feature = _featureFactory.GetFeature(KnownFeature.CodeBrowser); feature.Execute(this.CodeBrowserCommandId); } } else { _shellHelperService.OpenDesignerFiles(this.Selection); } }