-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormConfig.cs
57 lines (51 loc) · 1.61 KB
/
FormConfig.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
/**********************************************************************/
/* Copyright (c) 2023 Carpe Diem Software Developing by Alex Versetty */
/* http://carpediem.0fees.us */
/**********************************************************************/
using System;
using System.Windows.Forms;
namespace TrayTextPaste
{
public partial class FormConfig : Form
{
public FormConfig()
{
InitializeComponent();
Icon = Properties.Resources.AppIcon;
foreach (RadioButton rb in groupBox1.Controls)
{
if (rb.Text == ConfigManager.Current.CopySwitchPasteHotkey)
{
rb.Checked = true;
}
else
{
rb.Checked = false;
}
}
}
private void save_Click(object sender, EventArgs e)
{
foreach (RadioButton rb in groupBox1.Controls)
{
if (rb.Checked)
{
ConfigManager.Current.CopySwitchPasteHotkey = rb.Text;
break;
}
}
try
{
ConfigManager.save();
Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Ошибка записи файла конфигурации", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void rbHotkey_CheckedChanged(object sender, EventArgs e)
{
}
}
}