public static void findAndShowImage(string keyName) { Stream foundChunk = findKey(keyName); if (foundChunk != null && foundChunk.Length != 0) { DDSPreview ddsP = new DDSPreview(); ddsP.loadDDS(foundChunk); ddsP.ShowDialog(); } else { System.Windows.Forms.MessageBox.Show("Could not find an image with " + keyName + "!"); } }
private void btnPreviewTexture_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count == 1) { ListViewItem item = listView1.SelectedItems[0]; DDSPreview ddsP = new DDSPreview(); ddsP.loadDDS(item.SubItems[2].Text); ddsP.ShowDialog(); } }