How to use resource files in your C# WPF project

Some practical instructions on how to include resource files to your Visual Studio C# WPF project that are not source code. Such non-code files can include binary data, text files, media files, string values, icons, XML, or any other type of data. Project resource data is stored in XML format in the .resx file (named …

Continue reading ‘How to use resource files in your C# WPF project’ »

Using the WiX Toolset to create installers in Visual Studio C# projects

Here is some of their online documentation on how to use the WiX Toolset to create installers: https://www.firegiant.com/wix/tutorial/getting-started Here is a quick and concise guide to set up using the WiX Toolset in a Visual Studio project, in order to create installation packages, from start to finish. Step 1: Install WiX Toolset First make sure …

Continue reading ‘Using the WiX Toolset to create installers in Visual Studio C# projects’ »

Listening for network availability changes in C#

Firstly a console application program to consecutively ENABLE and DISABLE the network connectivity: using System; using System.Diagnostics; namespace NetworkDisconnect { internal class Program { private static void Enable(string interfaceName) { var psi = new ProcessStartInfo("netsh", "interface set interface \"" + interfaceName + "\" enable"); var p = new Process {StartInfo = psi}; p.Start(); } private …

Continue reading ‘Listening for network availability changes in C#’ »