Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions App.Cmd/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
using App.Cmd.Views;
using App.Core.Services;
using static System.Net.Mime.MediaTypeNames;

namespace App.Cmd
{
internal class Program
{
//Mutex to have app in mono-instance
static Mutex mutex = new Mutex(true, "{EasySaveMutex}");
static void Main(string[] args)
{
if (!mutex.WaitOne(TimeSpan.Zero, true))
{

return;
}

mutex.ReleaseMutex();
// Check if the arguments are null
ArgumentNullException.ThrowIfNull(args);

Expand Down
Binary file added Diagramme D'activit‚.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Diagramme cas utilisation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Diagramme de classe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Diagramme de s‚quence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion EasySave.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.Core", "App.Core\App.Co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.Cmd", "App.Cmd\App.Cmd.csproj", "{087719F3-E5C7-4EB9-9B26-28D8B2170BEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp", "WpfApp\WpfApp.csproj", "{F73113F9-BA17-40D8-9F89-4A5EC3D9EA00}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp", "WpfApp\WpfApp.csproj", "{F73113F9-BA17-40D8-9F89-4A5EC3D9EA00}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UML-DOCS", "UML-DOCS", "{03939F2F-7210-443E-AF82-5C14D233CFDE}"
ProjectSection(SolutionItems) = preProject
\\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme cas utilisation.png = \\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme cas utilisation.png
\\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme D'activit‚.png = \\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme D'activit‚.png
\\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme de classe.png = \\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme de classe.png
\\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme de s‚quence.png = \\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Diagramme de s‚quence.png
\\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Livrable 2 EasySavez.pdf = \\.psf\Home\Downloads\Livrable 2 Louis JAGUENEAU Paul PESHCEL Nathan LORIT Julien DESPREZ\Livrable 2 EasySavez.pdf
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Binary file added Livrable 2 EasySavez.pdf
Binary file not shown.
27 changes: 21 additions & 6 deletions WpfApp/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
using System.Configuration;
using System.Data;
using System;
using System.Threading;
using System.Windows;

namespace WpfApp
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
private static Mutex _mutex = null;

protected override void OnStartup(StartupEventArgs e)
{
const string appName = "MyAppName";
bool createdNew;

_mutex = new Mutex(true, appName, out createdNew);

if (!createdNew)
{
// L'application est déjà en cours d'exécution
MessageBox.Show("L'application est déjà en cours d'exécution.", "Erreur", MessageBoxButton.OK, MessageBoxImage.Error);
Current.Shutdown();
return;
}

base.OnStartup(e);
}
}
}