-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml.cs
More file actions
54 lines (49 loc) · 1.73 KB
/
App.xaml.cs
File metadata and controls
54 lines (49 loc) · 1.73 KB
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
using BoxNestGroup.Files;
using BoxNestGroup.Managers;
using System.IO;
using System.Windows;
namespace BoxNestGroup
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : System.Windows.Application
{
/// <summary>
/// コンストラクタ
/// </summary>
public App():base()
{
// ログ作成
LogFile.Instance.Create();
SettingManager.Instance.Create();
// 基本フォルダ
var currentFolder = Directory.GetCurrentDirectory();
LogFile.Instance.WriteLine($"{currentFolder.ToString()}");
}
/// <summary>
/// 初期化
/// </summary>
/// <param name="e"></param>
protected override void OnStartup(StartupEventArgs e)
{
// シングルトン化のため変更
/* App.xaml
<Application x:Class="BoxNestGroup.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BoxNestGroup"
StartupUri="MainWindow.xaml"
>
↓ に変更してsingleton化
<Application x:Class="BoxNestGroup.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BoxNestGroup"
>
*/
base.OnStartup(e);
BoxNestGroup.MainWindow.Instance.Show();
}
}
}