Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zonetecde committed Jul 1, 2023
1 parent 4b1d14d commit 5d68a3e
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions SignaMath/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public partial class MainWindow : Window
{
internal static MainWindow _MainWindow { get; set; }

private const string VERSION = "1.1.9";
private const string VERSION = "1.2.0";
internal static string BASE_URL { get; } = Config.Server;
private Software Software { get; set; }

Expand Down Expand Up @@ -484,7 +484,7 @@ private async void Button_DownloadUpdate_Click(object sender, RoutedEventArgs e)
});
});

string filePath = @"V_SignaMath.exe";
string filePath = $"SignaMath {Software.Version}.exe";
if (File.Exists(filePath))
{
File.Delete(filePath);
Expand Down Expand Up @@ -556,17 +556,35 @@ private async void Window_ContentRendered(object sender, EventArgs e)
richTextBox_news.Document.Blocks.Clear();
richTextBox_news.AppendText(Software.Features.Replace("\\n", "\n"));
}
else
{
// Supprime l'exe des anciennes version
foreach (var file in Directory.GetFiles(Environment.CurrentDirectory))
{
if (file.Contains("SignaMath") && file.Contains("exe") && !file.Contains($"SignaMath {Software.Version}.exe"))
{
try
{
File.Delete(file);
}
catch
{

}
}
}
}
}
else
{
// serveur problème
// Problème serveur
}

}
}
catch
{
// Pas de connexion internet / Problème serveur
// Pas de connexion internet
}
}

Expand Down

0 comments on commit 5d68a3e

Please sign in to comment.