-
Notifications
You must be signed in to change notification settings - Fork 2
/
MySqlLoginForm.cs
86 lines (71 loc) · 2.36 KB
/
MySqlLoginForm.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
81
82
83
84
85
86
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace DataQuestBuilder
{
public partial class MySqlLoginForm : Form
{
public MySqlLoginForm()
{
InitializeComponent();
}
private void primaryColor_Click(object sender, EventArgs e)
{
colorDialog.ShowDialog();
primaryColor.BackColor = colorDialog.Color;
Properties.Settings.Default.PrimaryColor = colorDialog.Color;
}
private void secondaryColor_Click(object sender, EventArgs e)
{
colorDialog.ShowDialog();
secondaryColor.BackColor = colorDialog.Color;
Properties.Settings.Default.SecondaryColor = colorDialog.Color;
}
private void mySqlLoginControl1_Load(object sender, EventArgs e)
{
}
private void MySqlLoginForm_Load(object sender, EventArgs e)
{
tooltipTime.TextChanged += new EventHandler(CheckTooltipDuration);
primaryColor.BackColor = Properties.Settings.Default.PrimaryColor;
secondaryColor.BackColor = Properties.Settings.Default.SecondaryColor;
tooltipTime.Text = Properties.Settings.Default.TooltipDuration;
}
void CheckTooltipDuration(object sender, EventArgs e)
{
foreach (char c in tooltipTime.Text)
{
if (!char.IsNumber(c))
{
tooltipTime.Text = "3";
}
}
int def = 3;
if (int.TryParse(tooltipTime.Text, out def))
{
if (def > 10)
tooltipTime.Text = "3";
}
}
private void saveButton_Click(object sender, EventArgs e)
{
Properties.Settings.Default.Save();
ToolTip tooltip = new ToolTip();
tooltip.ToolTipTitle = "Successful";
tooltip.Show("Options Saved Successfully!", saveButton, 3000);
tooltip.IsBalloon = true;
}
private void mySqlLoginControl_Load(object sender, EventArgs e)
{
}
private void eStepType1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}