WPF Project (Windows)

In order for you to change the appearance of your launchers we added an archive with the source code of the WPF project to the package.


Preparation


If you do not have Visual Studio installed, please install it from the official site. In installer window choose                                 ".NET desktop development". 

image-1591464346274.png

After that go to "Individual components" tab and choose ".NET 4.6.1".

image-1591464683067.png

After the installation is complete, unzip the "SGPatcherWPF-source.zip" archive to any folder. That file located in "Assets/SIDGIN/SIDGIN.Patcher".

Next, open the project SIDGIN.Patcher.VSClient.csproj.


View Edit

 


To edit launcher view open MainWindow.xaml.

 

image-1591465106580.png


Change application name and icon


Go to Properties of the project.

8.gif

To change icon click on "Browse" button and select your application icon.

image-1591465420687.png

To change name put new name to "Assembly name" filed.

image-1591465496117.png

Save the project.


Code Editing


All update logic is concentrated in the MainWindow.xaml.cs file. Here you can see several methods:

  • Start - starts the update process.
  • GetConfigurationBuilder - loads a configuration file from disk.
  • MainProgress - displays the program process.

If you want to change the logic, please see the section SG Patcher API.

image-1591465619474.png


Build application


To build application go to Build -> Build Solution. After build you will receive a file <YourAssemblyName>.exe in SGPatcherApp folder. 

image-1591465666172.png

If you changed assembly name to yours please remove SGPatcher.exe and SGPatcher.exe.config from SGPatcherApp folder.

You should get the following set of files and folders:

image-1591466033282.png

You must place the configuration(Version Building) file next to your .exe file and configure the localization(Multilingual).


WPF Documentation


For a deeper understanding of WPF please read the official documentation.