private void MenuItemCallback(object sender, EventArgs e) { if (resxFiles != null) { SortCommandHelper.SortResXFiles(ServiceProvider, resxFiles, false); } }
private void BeforeQueryStatus(object sender, EventArgs e) { var command = (OleMenuCommand)sender; var monitorSelection = (IVsMonitorSelection)Package.GetGlobalService(typeof(SVsShellMonitorSelection)); var commandState = SortCommandHelper.GetCommandState(monitorSelection); command.Visible = commandState.IsVisible; command.Enabled = commandState.IsEnabled; resxFiles = commandState.SelectedFiles; command.Text = Strings.SortAllRelatedResX; }