This repository was archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSettingWindow.cs
More file actions
56 lines (42 loc) · 1.55 KB
/
Copy pathSettingWindow.cs
File metadata and controls
56 lines (42 loc) · 1.55 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
55
56
using System;
using System.Windows.Forms;
using WolfEventCodeCreater.Model;
namespace WolfEventCodeCreater
{
public partial class SettingWindow : Form
{
private UserSetting userSetting;
private UserSetting.WoditorSettingsInfo woditorSettings;
private UserSetting.OutputSettingsInfo outputSettings;
public SettingWindow(UserSetting userSetting)
{
InitializeComponent();
this.userSetting = userSetting;
woditorSettings = userSetting.WoditorSettings;
outputSettings = userSetting.OutputSettings;
textBox1.Text = outputSettings.OutputDirName;
textBox2.Text = outputSettings.CommentOut;
comboBox1.Items.Add("出力する");
comboBox1.Items.Add("出力しない");
comboBox1.SelectedIndex = outputSettings.IsOutputCommonNumber ? 0 : 1;
}
private void submit(object sender, EventArgs e)
{
outputSettings.OutputDirName = textBox1.Text;
outputSettings.CommentOut = textBox2.Text;
outputSettings.IsOutputCommonNumber = comboBox1.SelectedIndex == 0 ? true : false;
Utils.File.WriteUserSetting(userSetting);
var result = MessageBox.Show(
$"設定を変更しました。",
"確認",
MessageBoxButtons.OK,
MessageBoxIcon.None
);
Close();
}
private void cancel(object sender, EventArgs e)
{
Close();
}
}
}