Skip to content

Commit

Permalink
* More code
Browse files Browse the repository at this point in the history
  • Loading branch information
Wagnerp committed Mar 17, 2018
1 parent 1c86d15 commit d987b42
Show file tree
Hide file tree
Showing 58 changed files with 28,218 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Class Diagram\" />
<Folder Include="UI\Advanced\Wizard\" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// 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("4.70.313.0")]
[assembly: AssemblyFileVersion("4.70.313.0")]
[assembly: AssemblyVersion("4.70.326.0")]
[assembly: AssemblyFileVersion("4.70.326.0")]
[assembly: NeutralResourcesLanguage("en-GB")]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public partial class StartupForm : KryptonForm
#region Variables
private bool _isRunning = false;

private string _serverURL;
private string _serverURL, _xmlServerFileURL;

private Version _currentApplicationVersion;

private GlobalMethods _globalMethods = new GlobalMethods();

Expand All @@ -27,6 +29,8 @@ public partial class StartupForm : KryptonForm

private XMLFileParser xmlFileParser = new XMLFileParser();

private TranslationMethods translationMethods = new TranslationMethods();

private IUpdatable _updatable;
#endregion

Expand Down Expand Up @@ -68,20 +72,62 @@ public string ServerURL
_serverURL = value;
}
}

/// <summary>
/// Gets or sets the XML server file URL.
/// </summary>
/// <value>
/// The XML server file URL.
/// </value>
public string XMLServerFileURL
{
get
{
return _xmlServerFileURL;
}

set
{
_xmlServerFileURL = value;
}
}

/// <summary>
/// Gets or sets the current application version.
/// </summary>
/// <value>
/// The current application version.
/// </value>
public Version CurrentApplicationVersion
{
get
{
return _currentApplicationVersion;
}

set
{
_currentApplicationVersion = value;
}
}
#endregion

#region Constructor
/// <summary>
/// Initialises a new instance of the <see cref="StartupForm"/> class.
/// </summary>
/// <param name="xmlServerFileURL">The XML server file URL.</param>
/// <param name="currentApplicationVersion">The current application version.</param>
/// <param name="useUACElevation">if set to <c>true</c> [use uac elevation].</param>
/// <param name="serverURL">The server URL.</param>
public StartupForm(bool useUACElevation = false, string serverURL = null)
public StartupForm(string xmlServerFileURL, Version currentApplicationVersion, bool useUACElevation = false, string serverURL = null)
{
InitializeComponent();

SetServerURL(serverURL);

ServerURL = serverURL;

if (useUACElevation)
{
kbtnCheckForUpdates.Visible = false;
Expand Down Expand Up @@ -118,7 +164,7 @@ private void kbtnCancel_Click(object sender, EventArgs e)
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void kbtnCheckForUpdates_Click(object sender, EventArgs e)
{
if (_updaterLogic.CheckForUpdates(internalApplicationUpdaterSettingsManager.GetXMLFileURL(), Version.Parse(internalApplicationUpdaterSettingsManager.GetCurrentApplicationVersion()), internalApplicationUpdaterSettingsManager.GetXMLFileURL()))
if (_updaterLogic.CheckForUpdates(ServerURL, CurrentApplicationVersion, internalApplicationUpdaterSettingsManager.GetXMLFileURL()))
{
UpdateAvailableForm updateAvailable = new UpdateAvailableForm(internalApplicationUpdaterSettingsManager.GetApplicationName(), Version.Parse(internalApplicationUpdaterSettingsManager.GetCurrentApplicationVersion()), Version.Parse(xmlFileApplicationUpdaterSettingsManager.GetServerVersion()), xmlFileApplicationUpdaterSettingsManager.GetChangelogServerURLDownloadLocation());

Expand All @@ -128,7 +174,7 @@ private void kbtnCheckForUpdates_Click(object sender, EventArgs e)
}
else
{

klblDetails.Text = $"No new updates are available.\nYour version: { CurrentApplicationVersion.ToString() }\nServer version: { xmlFileApplicationUpdaterSettingsManager.GetServerVersion() }";
}
}

Expand Down Expand Up @@ -181,7 +227,18 @@ private void kbtOptions_Click(object sender, EventArgs e)

private void StartupForm_Load(object sender, EventArgs e)
{
xmlFileParser.ParseXMLFile(new Uri(internalApplicationUpdaterSettingsManager.GetXMLFileURL()), internalApplicationUpdaterSettingsManager.GetApplicationIdentification());
try
{
if (XMLServerFileURL != null)
{
xmlFileParser.ParseXMLFile(new Uri(XMLServerFileURL), null);
}
}
catch (Exception exc)
{

throw;
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d987b42

Please sign in to comment.