forked from retifrav/hugeCSVsplitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
65 lines (62 loc) · 2.16 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
namespace hugeCSVsplitter
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
//protected override void OnStartup(StartupEventArgs e)
//{
// base.OnStartup(e);
// string[] cmdArgs = Environment.GetCommandLineArgs();
// Dictionary<string, string> args = new Dictionary<string, string>();
// if (cmdArgs.Length > 1)
// {
// try
// {
// for (int i = 1; i < cmdArgs.Length; i += 2)
// {
// args.Add(cmdArgs[i], cmdArgs[i + 1]);
// }
// }
// catch (Exception ex)
// {
// MessageBox.Show(
// "You passed some wrong arguments. Start the application without any arguments and press F1 for help.",
// "Error parsing command line arguments",
// MessageBoxButton.OK,
// MessageBoxImage.Error
// );
// }
// }
// else
// {
// new MainWindow().ShowDialog();
// }
// this.Shutdown();
//}
private void Application_DispatcherUnhandledException(
object sender,
System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e
)
{
MessageBox.Show(
//string.Format("Some error has just hapenned.{1}Details: {0}{1}Even more details: {2}", e.Exception.Message, Environment.NewLine, e.Exception.StackTrace),
string.Format("Some error has just hapenned.{1}Details: {0}",
e.Exception.Message, Environment.NewLine),
"Unknown error",
MessageBoxButton.OK,
MessageBoxImage.Error
);
e.Handled = true;
}
}
}