Skip to content

Commit

Permalink
* Upgraded to .NET Framework 4.8
Browse files Browse the repository at this point in the history
* Code refactoring
* Updated readme
  • Loading branch information
CodeDead committed May 6, 2019
1 parent 9c1e734 commit 3d437e1
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 20 deletions.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ UpdateManager was created by DeadLine. This library was developed free of charge

This library can be used to check for application updates. It is designed for WPF and Windows Forms applications.
In order to use it, you require an XML file on a remote or local server that represents the Update class.
# Usage

## Dependencies
* [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48)

## Usage
UpdateManager is available as a [NuGet package](https://www.nuget.org/packages/CodeDead.UpdateManager/). You can find it here:
https://www.nuget.org/packages/CodeDead.UpdateManager/

Create a new UpdateManager object like this:
```C#
// Import statement
using CodeDead.UpdateManager.Classes;
// Setting text variables
StringVariables stringVariables = new StringVariables
{
CancelButtonText = "Cancel",
Expand All @@ -19,7 +25,7 @@ StringVariables stringVariables = new StringVariables
TitleText = "Your application title",
UpdateNowText = "Would you like to update the application now?"
};
UpdateManager.Classes.UpdateManager updateManager = new UpdateManager.Classes.UpdateManager(Assembly.GetExecutingAssembly().GetName().Version, "https://yoururl/update.xml", stringVariables);
UpdateManager updateManager = new UpdateManager(Assembly.GetExecutingAssembly().GetName().Version, "https://yoururl/update.xml", stringVariables);
```

Check for updates like this:
Expand All @@ -34,7 +40,7 @@ catch (Exception ex)
}
```

# Update XML example
## Update XML example
```XML
<?xml version="1.0"?>
<Update xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand All @@ -48,5 +54,12 @@ catch (Exception ex)
</Update>
```

# License
This library is licensed under the GPLv3.
# About
This library is maintained by CodeDead. You can find more about us using the following links:
* [Website](https://codedead.com)
* [Twitter](https://twitter.com/C0DEDEAD)
* [Facebook](https://facebook.com/deadlinecodedead)
* [Reddit](https://reddit.com/r/CodeDead/)

We would also like to thank JetBrains for the open source license that they granted us to work with wonderful tools such as [Rider](https://jetbrains.com/rider) and [Resharper](https://jetbrains.com/resharper).

4 changes: 2 additions & 2 deletions UpdateManager/Classes/StringVariables.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace UpdateManager.Classes
namespace CodeDead.UpdateManager.Classes
{
/// <summary>
/// Class containing all available strings that can be displayed to the user
/// </summary>
public class StringVariables
public sealed class StringVariables
{
#region Properties
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions UpdateManager/Classes/Update.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System.Xml.Serialization;

namespace UpdateManager.Classes
namespace CodeDead.UpdateManager.Classes
{
/// <summary>
/// Check whether a new version is available or not
/// </summary>
public class Update
public sealed class Update
{
#region XML_Update
/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions UpdateManager/Classes/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using System.Net;
using System.Windows;
using System.Xml.Serialization;
using UpdateManager.Windows;
using CodeDead.UpdateManager.Windows;

namespace UpdateManager.Classes
namespace CodeDead.UpdateManager.Classes
{
/// <summary>
/// The UpdateManager has the ability to check for software updates
/// </summary>
public class UpdateManager
public sealed class UpdateManager
{
#region Variables
/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions UpdateManager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CodeDead")]
[assembly: AssemblyProduct("UpdateManager")]
[assembly: AssemblyCopyright("Copyright © CodeDead 2019")]
[assembly: AssemblyCopyright("Copyright © 2019 CodeDead")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.3.0")]
[assembly: AssemblyFileVersion("1.4.3.0")]
[assembly: AssemblyVersion("1.4.4.0")]
[assembly: AssemblyFileVersion("1.4.4.0")]
6 changes: 3 additions & 3 deletions UpdateManager/UpdateManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<ProjectGuid>{4E804EAD-446A-47CC-B231-0A6255B867A3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UpdateManager</RootNamespace>
<AssemblyName>UpdateManager</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<RootNamespace>CodeDead.UpdateManager</RootNamespace>
<AssemblyName>CodeDead.UpdateManager</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion UpdateManager/Windows/UpdateWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Window
x:Class="UpdateManager.Windows.UpdateWindow"
x:Class="CodeDead.UpdateManager.Windows.UpdateWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion UpdateManager/Windows/UpdateWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Windows;
using Microsoft.Win32;

namespace UpdateManager.Windows
namespace CodeDead.UpdateManager.Windows
{
/// <inheritdoc cref="Window" />
/// <summary>
Expand Down

0 comments on commit 3d437e1

Please sign in to comment.