This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
SettingsView.cs
80 lines (69 loc) · 2.49 KB
/
SettingsView.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using Yuzu_Updater;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Yuzu_Updater
{
public partial class SettingsView : Form
{
private Settings _settings = Settings.GetInstance();
public SettingsView()
{
InitializeComponent();
}
private void AutoLaunchCheckbox_CheckedChanged(object sender, EventArgs e)
{
_settings.AutoLaunch = AutoLaunchCheckbox.Checked;
_settings.Save();
}
private void LaunchAsAdminCheckbox_CheckedChanged(object sender, EventArgs e)
{
_settings.LaunchAsAdmin = LaunchAsAdminCheckbox.Checked;
_settings.Save();
}
private void AutoCloseCheckbox_CheckedChanged(object sender, EventArgs e)
{
_settings.AutoClose = AutoCloseCheckbox.Checked;
_settings.Save();
}
private void BackupSaveFilesCheckbox_CheckedChanged(object sender, EventArgs e)
{
_settings.BackupSaveFiles = BackupSaveFilesCheckbox.Checked;
_settings.Save();
}
private void SettingsView_Load(object sender, EventArgs e)
{
AutoCloseCheckbox.Checked = _settings.AutoClose;
AutoLaunchCheckbox.Checked = _settings.AutoLaunch;
SinModeCheckbox.Checked = _settings.SinMode;
LaunchAsAdminCheckbox.Checked = _settings.LaunchAsAdmin;
BackupSaveFilesCheckbox.Checked = _settings.BackupSaveFiles;
AcceleratedDownloadsCheckbox.Checked = _settings.AcceleratedDownloads;
MaxConnectionsCounter.Value = _settings.MaxConnections;
}
private void AcceleratedDownloadsCheckbox_CheckedChanged(object sender, EventArgs e)
{
_settings.AcceleratedDownloads = AcceleratedDownloadsCheckbox.Checked;
_settings.Save();
}
private void MaxConnectionsCounter_ValueChanged(object sender, EventArgs e)
{
_settings.MaxConnections = (int)MaxConnectionsCounter.Value;
_settings.Save();
}
private void SinModeCheckbox_CheckedChanged(object sender, EventArgs e)
{
_settings.SinMode = SinModeCheckbox.Checked;
_settings.Save();
}
private void WarningLabel_Click(object sender, EventArgs e)
{
}
}
}