-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cs
34 lines (26 loc) · 995 Bytes
/
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
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace XPhotos {
/// <summary>
/// Логика взаимодействия для App.xaml
/// </summary>
public partial class App : Application {
public static string CurrentDir { get; private set; }
public static string LogsDir { get; private set; }
public static string ConfigFile { get; private set; }
protected override void OnStartup(StartupEventArgs e) {
CurrentDir = AppDomain.CurrentDomain.BaseDirectory;
ConfigFile = Path.Combine(CurrentDir, "app.cfg");
if(!File.Exists(ConfigFile)) File.Create(ConfigFile);
LogsDir = Path.Combine(CurrentDir, "CrashLogs");
if (!Directory.Exists(LogsDir)) Directory.CreateDirectory(LogsDir);
base.OnStartup(e);
}
}
}