Hello,
I am not sure if I understand what You mean, but i assume You have created the application. You have some files which are associated with your application. When you double click on the file, your custom editor starts, but you don't know how to get the file that was double clicked. Am I right? If so, then look below.
Double clicked file path is beeing sent to the application via the startup arguments.
So if You have custom editor for exapmle C:\editor.exe and custom file in example C:\file.cus the parameters to the application will look like below:
C:\editor.exe C:\file.cus
As You see, the file path is sent as first argument. The code below will show You the details, if You associate the file with this application. It just simply prits the number of arguments sent to the program and each of the arguments below.
class Program
{
static void Main(string[] args)
{
Console.WriteLine(String.Format("Args.Length: {0}", args.Length));
foreach (String s in args)
Console.WriteLine(s);
Console.ReadKey();
}
}
Hope it helps.
Greetings,
BJ