123456789101112131415161718192021 |
- using System.Diagnostics;
- using System.Windows;
- namespace PRSLogikal
- {
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App
- {
- protected override void OnStartup(StartupEventArgs e)
- {
- string _procName = Process.GetCurrentProcess().ProcessName;
- Process[] _processes=Process.GetProcessesByName(_procName);
- if (_processes.Length > 1)
- Shutdown(0);
- base.OnStartup(e);
- }
-
- }
- }
|