/// <summary> /// Adds a set of dialog ids found in the specified file to the list. /// </summary> public void AddDialogs(string fileName, ReadOnlyCollection<string> dialogs) { try { BeginUpdate(); foreach (string dialog in dialogs) { SetupDialogListViewItem item = new SetupDialogListViewItem(fileName, dialog); Items.Add(item); } } finally { EndUpdate(); } }
/// <summary> /// Adds a set of dialog ids found in the specified file to the list. /// </summary> public void AddDialogs(string fileName, ReadOnlyCollection <string> dialogs) { try { BeginUpdate(); foreach (string dialog in dialogs) { SetupDialogListViewItem item = new SetupDialogListViewItem(fileName, dialog); Items.Add(item); } } finally { EndUpdate(); } }
/// <summary> /// Opens the selected dialog and displays it in the designer. /// </summary> public void OpenSelectedDialog() { SetupDialogListViewItem selectedDialog = SelectedDialog; if (selectedDialog != null) { SetupDialogErrorListViewItem errorItem = selectedDialog as SetupDialogErrorListViewItem; if (errorItem == null) { OpenDialog(selectedDialog.FileName, selectedDialog.Id); } else { FileService.JumpToFilePosition(errorItem.FileName, errorItem.Line, errorItem.Column); } } }
public override void Run() { // Get currently selected setup dialog. SetupDialogListViewItem selectedDialogListItem = SetupDialogListPad.Instance.SelectedDialog; if (selectedDialogListItem == null) { return; } SetupDialogErrorListViewItem errorDialogListItem = selectedDialogListItem as SetupDialogErrorListViewItem; if (errorDialogListItem == null) { ViewDialogXml(selectedDialogListItem.FileName, selectedDialogListItem.Id); } else { FileService.JumpToFilePosition(errorDialogListItem.FileName, errorDialogListItem.Line, errorDialogListItem.Column); } }