FileDoubleClick() public static method

Handle double-clicking on a file. Depending on the saved options, we either do nothing ("0"), open a file using a default Explorer file association ("1"), or open a file using a specified application ("2")
public static FileDoubleClick ( string file ) : void
file string
return void
Esempio n. 1
0
 /// <summary>
 /// Control is double-clicked. Open the selected item for viewing.
 /// Depending on the saved options, we either do nothing ("0"), open a file
 /// using a default Explorer file association ("1"), or open a file using a
 /// specified application ("2")
 /// </summary>
 private void ListRevDoubleClick(object sender, EventArgs e)
 {
     if (listRev.SelectedIndices.Count == 1)
     {
         // Create a temp file and open the file
         string temp = GetTempFile(file, listRev.SelectedItems[0].Name);
         if (!string.IsNullOrEmpty(temp))
         {
             ClassUtils.FileDoubleClick(temp);
         }
     }
 }