private void onSelectError(string File, int Line, int Col) { string[] OpenFiles = NppFunctions.GetOpenFiles(); string[] files = new string[2]; //Compare by file name and extension first files[0] = Path.GetFileName(File); foreach (string OpenFile in OpenFiles) { files[1] = Path.GetFileName(OpenFile); IBMi.AddOutput(files[0] + " == " + files[1]); if (files[0] == files[1]) { NppFunctions.SwitchToFile(OpenFile, Line, Col); return; } } //Compare just by file name afterwards files[0] = Path.GetFileNameWithoutExtension(File); foreach (string OpenFile in OpenFiles) { files[1] = Path.GetFileNameWithoutExtension(OpenFile); IBMi.AddOutput(files[0] + " == " + files[1]); if (files[0] == files[1]) { NppFunctions.SwitchToFile(OpenFile, Line, Col); return; } } //Compare just by file name & try MEMBER name files[0] = GetQSYSMemberName(File); foreach (string OpenFile in OpenFiles) { files[1] = Path.GetFileNameWithoutExtension(OpenFile); IBMi.AddOutput(files[0] + " == " + files[1]); if (files[0] == files[1]) { NppFunctions.SwitchToFile(OpenFile, Line, Col); return; } } if (Main.CommandWindow != null) { Main.CommandWindow.loadNewOutput(); } MessageBox.Show("Unable to open error. Please open the source manually first and then try again.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void listView1_DoubleClick(object sender, EventArgs e) { if (listView1.SelectedItems.Count == 1) { Config.SwitchToConfig(listView1.SelectedItems[0].Text); if (Main.BindsWindow != null) { Main.BindsWindow.cmdBindings_Load(); } if (Main.MemberListWindow != null) { Main.MemberListWindow.UpdateSystemName(); } IBMi.AddOutput("Switched to " + listView1.SelectedItems[0].Text + "."); this.Close(); } }