Here is a snippet of code that will allow you to invoke the OS to launch the application associated with the OS file mapping.
this is C# 3.0 but mostly C#2.0 DLLs
using System.IO.FileInfo;
using System.IO.FileStream;
try
{
Diagram diagram = (Diagram)ListView.SelectedItem;
string tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), System.IO.Path.GetRandomFileName());
FileInfo fileInfo = new FileInfo(diagram.Filename);
tempFile += fileInfo.Extension;
FileStream fs = System.IO.File.Create(tempFile);
fs.Write(diagram.Diagram, 0, diagram.Diagram.Length); // diagram.Diagram here is a byte[] of the actually diagram object
fs.Close();
System.Diagnostics.Process.Start(tempFile);
}
catch (System.ComponentModel.Win32Exception e)
{
//No application is associated with this file.
WorkbenchApplication.ShowMessageToUser("There is no application associated with this file extension.");
}
I did not write this code, a co worker, Marrio Matriccino found it and passed it onto me.