summaryrefslogtreecommitdiff
path: root/love2dToAPK/Forms/frmSettings.cs
blob: 3b433819a9973becee157b7c97a536973af1c1f1 (plain) (blame)
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace love2dToAPK.Forms {
    public partial class frmSettings : love2dToAPK.Forms.baseForm {
        public frmSettings() {
            InitializeComponent();

            WindowTitle = "Settings";
            MinimizeAble = false;

            this.TopMost = Properties.Settings.Default.alwaysOnTop;
        }

        private void frmSettings_Load(object sender, EventArgs e) {
            btnSave.BackgroundColor = ColorTranslator.FromHtml("#0fdb0f");

            cbAlwaysOnTop.Checked = Properties.Settings.Default.alwaysOnTop;
            cbCloseOnSuccess.Checked = Properties.Settings.Default.closeOnSuccess;
        }

        private void btnSave_Click(object sender, EventArgs e) {
            Properties.Settings.Default.alwaysOnTop = cbAlwaysOnTop.Checked;
            Properties.Settings.Default.closeOnSuccess = cbCloseOnSuccess.Checked;
            Properties.Settings.Default.Save();
            MessageBox.Show("Restart the app for changes to take effect.");
            this.Close();
        }
    }
}