Skip to content

Commit

Permalink
updated version
Browse files Browse the repository at this point in the history
  • Loading branch information
Wampa842 committed Jun 1, 2018
1 parent 7ec6ed8 commit c37b791
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 20 deletions.
7 changes: 6 additions & 1 deletion WPlugins.Common/About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ You should have received a copy of the GNU General Public License

namespace WPlugins.Common
{
public static class Info
{
public static string Version { get; } = "0.2.0";
}

public class About : IPEPlugin
{
public void Run(IPERunArgs args)
Expand All @@ -36,7 +41,7 @@ public void Run(IPERunArgs args)
}

public string Name => "About && Update";
public string Version => "0.1.2";
public string Version => Info.Version;
public string Description => "Information about and updates for WPlugins";
class PluginOptions : IPEPluginOption
{
Expand Down
30 changes: 19 additions & 11 deletions WPlugins.Common/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,30 @@ public partial class AboutForm : Form

private int compareSemvers(string a, string b)
{
string[] splitA = a.Split('.');
string[] splitB = b.Split('.');
int result;
if ((result = string.Compare(splitA[0], splitB[0])) != 0)
return result;
if ((result = string.Compare(splitA[1], splitB[1])) != 0)
return result;
if ((result = string.Compare(splitA[2], splitB[2])) != 0)
return result;
return 0;
try
{
string[] splitA = a.Split('.');
string[] splitB = b.Split('.');
int result;
if ((result = string.Compare(splitA[0], splitB[0])) != 0)
return result;
if ((result = string.Compare(splitA[1], splitB[1])) != 0)
return result;
if ((result = string.Compare(splitA[2], splitB[2])) != 0)
return result;
return 0;
}
catch
{
return -1;
}
}

public AboutForm()
{
currentVersion = Regex.Match(System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), "^(\\d+\\.\\d+\\.\\d+).*").Groups[1].ToString();
InitializeComponent();
//currentVersion = Regex.Match(System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), "^(\\d+\\.\\d+\\.\\d+).*").Groups[1].ToString();
currentVersionLabel.Text = currentVersion = Info.Version;
}

private void githubLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions WPlugins.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,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("0.1.2")]
[assembly: AssemblyFileVersion("0.1.2.0")]
[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
2 changes: 1 addition & 1 deletion WPlugins.ObjExport/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ private void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArg

public string Ext => ".obj";

public string Caption => "WPlugins Obj Exporter (version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + ")";
public string Caption => "WPlugins Obj Exporter (version " + Common.Info.Version + ")";
}
}
4 changes: 2 additions & 2 deletions WPlugins.ObjExport/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,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("0.1.2")]
[assembly: AssemblyFileVersion("0.1.2.0")]
[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
2 changes: 1 addition & 1 deletion WPlugins.ObjImport/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,6 @@ public IPXPmx Import(string path, IPERunArgs args)

public string Ext => ".obj";

public string Caption => "WPlugins Obj Importer (version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + ")";
public string Caption => "WPlugins Obj Importer (version " + Common.Info.Version + ")";
}
}
4 changes: 2 additions & 2 deletions WPlugins.ObjImport/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,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.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]

0 comments on commit c37b791

Please sign in to comment.