Guide on use

Sep 26, 2014 at 12:36 PM

This looks exactly like what I need for an application of mine.

I Just wondering if you had a guide on how to use this solution.

I have tried loading the downloaded sample but I just receive a number of errors when compiling and unfortunately my understanding of .Net code is not enough to work out how to implement this in a project of my own.

Many thanks
Sep 26, 2014 at 12:48 PM
The errors you are getting are probably caused by the fact that the project has a self-signed cetificate used to strong-sign the output assembly.
You can go to the Project properties of the Custom.Windows project, and uncheck Sign the assembly in the Signing section.

That said, the best approach to actually use this project, is through the NuGet package. You can download it here, or use the NuGet Package Manager in Visual Studio, to add the dependency to your project.
Sep 26, 2014 at 1:08 PM

Many thanks for the quick response.

I have now successfully managed to compile the solution (I also had to update NuGet files manually using 'NuGet update -self' before it would word).

Do you have any guide on how to use the NuGet package in an existing application, or a sample step-by-step on setting everything up. I'm struggling to work out how to actually implement the NuGet package.

Thanks again
Sep 26, 2014 at 2:50 PM
If you are using vs2012/2013, make sure NuGet extension is updated.
Open your project, then right click on the project icon in the Solution explorer, Add NuGet Package Reference. Search for the package, then install it. After that, you can follow the samples included in the sources. It's just a matter of changing the App.xaml and set a guid (the assembly guid is fine).
Sep 26, 2014 at 2:55 PM
Ok thanks,

I will try and see if I can work out how it all works and how to implement it within my own solution by reading through the code.
Sep 26, 2014 at 4:30 PM

I have to be honest and say that I am struggling to work out how to achieve what I would like to.

In it's simplest form I have an application with an app.xaml and MainWindow.xaml
The MainWindow has a ListView control.

What I have set up is a right-click menu option for files (CLASSES_ROOT registry) so that when right-clicking a file they can choose <AppName>. What I would like is for the application to take the filename and add it to the ListView control.

If a person selects multiple files and then chooses the right-click menu option I would like for all the different files to be added to the same ListView control.

Hope this makes sense.

Sep 30, 2014 at 12:48 PM
Once you have set a proper Id for the application, as you can see in the samples included in the source-code, it's just a matter of implementing the OnStartupNextInstance, since the list of paths should be passed as application arguments.
I suppose your code already passes the path to the target file to the process (and does the same with multiple files), if so, you just have to put some logic in the OnStartupNextInstance, that informs the prior instance that a new application instance has started up. Again, following examples, you can implement the OnStartup override to verify if the instance is not the first one, and shutdown (which is required to have a single instance).

If you can provide more information about what you are not able to figure out, I'll try to help as muh as I can.
Sep 30, 2014 at 12:50 PM

Many thanks for the explanation. Hopefully I should be able to work out the rest from here.

Once again, thanks : )