Skip to content

Commit

Permalink
move module versions to their own VersionInfo classes
Browse files Browse the repository at this point in the history
  • Loading branch information
AyeTSG committed Oct 19, 2022
1 parent 90e72ea commit e0d679f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 15 deletions.
10 changes: 1 addition & 9 deletions KulectorDB/Kulection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@

namespace KulectorDB
{
public class KulectionConstants
{
// Holds the version of KulectionDB
// that should be saved into
// a kulection file.
public static string VERSION = "v0.2.2";
}

[Serializable]
public class Kulection
{
Expand All @@ -36,7 +28,7 @@ public Kulection(string Name)
{
// set default properties
KulectionName = Name;
KulectionVersion = KulectionConstants.VERSION;
KulectionVersion = KulectorDB.VersionInfo.VERSION;
KulectionItems = new List<KulectionItem>();
}

Expand Down
13 changes: 13 additions & 0 deletions KulectorDB/VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright AyeTSG 2022.

// Stores the version information
// for the KulectorDB module

namespace KulectorDB
{
public class VersionInfo
{
// KulectorUI version
public static string VERSION = "v0.2.2";
}
}
13 changes: 13 additions & 0 deletions KulectorExporter/VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright AyeTSG 2022.

// Stores the version information
// for the KulectorExporter module

namespace KulectorExporter
{
public class VersionInfo
{
// KulectorUI version
public static string VERSION = "v0.1";
}
}
13 changes: 13 additions & 0 deletions KulectorExternalApis/VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright AyeTSG 2022.

// Stores the version information
// for the KulectorExternalApis module

namespace KulectorExternalApis
{
public class VersionInfo
{
// KulectorUI version
public static string VERSION = "v0.1";
}
}
7 changes: 4 additions & 3 deletions KulectorUI/Forms/Greeting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// the user to the Kulector app

using KulectorDB;
using KulectorExternalApis;

namespace KulectorUI.Forms
{
Expand All @@ -15,8 +16,8 @@ public Greeting()
InitializeComponent();

// set version info
LblUiVer.Text = "KulectorUI " + Program.VERSION;
LblDbVer.Text = "KulectorDB " + KulectionConstants.VERSION;
LblUiVer.Text = "KulectorUI " + KulectorUI.VersionInfo.VERSION;
LblDbVer.Text = "KulectorDB " + KulectorDB.VersionInfo.VERSION;
}

// Create Kulection
Expand All @@ -39,7 +40,7 @@ private void BtnOpen_Click(object sender, EventArgs e)
Kulection openedKul = KulectionSerialization.LoadKulectionFile(OfdOpenKul.FileName);

// Check the version
if (openedKul.KulectionVersion != KulectionConstants.VERSION)
if (openedKul.KulectionVersion != VersionInfo.VERSION)
{
// Show the warning dialog!
this.Hide();
Expand Down
3 changes: 0 additions & 3 deletions KulectorUI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ namespace KulectorUI
{
internal static class Program
{
// KulectorUI version
public static string VERSION = "v0.4";

/// <summary>
/// The main entry point for the application.
/// </summary>
Expand Down
13 changes: 13 additions & 0 deletions KulectorUI/VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright AyeTSG 2022.

// Stores the version information
// for the KulectorUI module

namespace KulectorUI
{
public class VersionInfo
{
// KulectorUI version
public static string VERSION = "v0.4";
}
}

0 comments on commit e0d679f

Please sign in to comment.