Class representing a manager for connections in SQL editor.
More...
|
override void | Dispose (bool disposing) |
| Clean up any resources being used. More...
|
|
|
void | UpdateComboBoxItems () |
| Updates items in drop down ComboBox . Is called when connection profile is modified or deleted. More...
|
|
void | cm_profiles_SelectedIndexChanged (object sender, EventArgs e) |
| Handler, that is called whenever drop down ComboBox selected index changes. More...
|
|
void | UpdateTextComponents () |
| Updates text TextBox with values from Settings. More...
|
|
void | cm_save_Click (object sender, EventArgs e) |
| Handler, that is called when user clicks Save button. More...
|
|
void | UpdateComboBoxSelectedIndex () |
| Changes selected drop down ComboBox inded when connection is modified, so that it still points to the same connection profile. More...
|
|
void | SaveToSettings () |
| Saves current values to settings and encrypts the password. More...
|
|
void | cm_delete_Click (object sender, EventArgs e) |
| Handler, that is called when user clicks Delete button. More...
|
|
void | cm_connect_Click (object sender, EventArgs e) |
| Handler, that is called when user clicks Connect button. It validates connection parameters and takes care of closing this, and showing Editor form. More...
|
|
bool | ValidateInput (bool validateName=true) |
| Validates input the user entered into TextBox es. Validation of the name is not required when arguments are used to connect, but not to save the connection. More...
|
|
void | InitializeComponent () |
| Required method for Designer support - do not modify the contents of this method with the code editor. More...
|
|
|
static readonly Regex | IdentifierPattern = new Regex("[a-zA-Z0-9_]+") |
| Regular expression pattern used to validate identifier. Identifier has to be at least one character long and must contain only alpha numeric characters and underscore. More...
|
|
static readonly Regex | HostnamePattern = new Regex("([a-zA-Z_0-9-]+)((\\.|::?)[a-zA-Z_0-9-]+)*") |
| Regular expression pattern used to validate hostname. Matches hostname, IPv4 or IPV6 address More...
|
|
Class representing a manager for connections in SQL editor.
SSQLE.ConnectionManager.ConnectionManager |
( |
| ) |
|
void SSQLE.ConnectionManager.cm_connect_Click |
( |
object |
sender, |
|
|
EventArgs |
e |
|
) |
| |
|
private |
Handler, that is called when user clicks Connect button. It validates connection parameters and takes care of closing this, and showing Editor form.
- Parameters
-
sender | Button that triggered the event. |
e | Event arguments. |
void SSQLE.ConnectionManager.cm_delete_Click |
( |
object |
sender, |
|
|
EventArgs |
e |
|
) |
| |
|
private |
Handler, that is called when user clicks Delete button.
- Parameters
-
sender | Button that triggered the event. |
e | Event arguments. |
void SSQLE.ConnectionManager.cm_profiles_SelectedIndexChanged |
( |
object |
sender, |
|
|
EventArgs |
e |
|
) |
| |
|
private |
Handler, that is called whenever drop down ComboBox
selected index changes.
- Parameters
-
sender | ComboBox that triggered this event. |
e | Event arguments. |
void SSQLE.ConnectionManager.cm_save_Click |
( |
object |
sender, |
|
|
EventArgs |
e |
|
) |
| |
|
private |
Handler, that is called when user clicks Save button.
- Parameters
-
sender | Button that triggered the event. |
e | Event arguments. |
override void SSQLE.ConnectionManager.Dispose |
( |
bool |
disposing | ) |
|
|
protected |
Clean up any resources being used.
- Parameters
-
disposing | true if managed resources should be disposed; otherwise, false. |
void SSQLE.ConnectionManager.InitializeComponent |
( |
| ) |
|
|
private |
Required method for Designer support - do not modify the contents of this method with the code editor.
void SSQLE.ConnectionManager.SaveToSettings |
( |
| ) |
|
|
private |
Saves current values to settings and encrypts the password.
void SSQLE.ConnectionManager.UpdateComboBoxItems |
( |
| ) |
|
|
private |
Updates items in drop down ComboBox
. Is called when connection profile is modified or deleted.
void SSQLE.ConnectionManager.UpdateComboBoxSelectedIndex |
( |
| ) |
|
|
private |
Changes selected drop down ComboBox
inded when connection is modified, so that it still points to the same connection profile.
void SSQLE.ConnectionManager.UpdateTextComponents |
( |
| ) |
|
|
private |
Updates text TextBox
with values from Settings.
bool SSQLE.ConnectionManager.ValidateInput |
( |
bool |
validateName = true | ) |
|
|
private |
static bool SSQLE.ConnectionManager.ValidateTextBoxForHostname |
( |
TextBox |
textBox | ) |
|
|
staticprivate |
Checks whether given textBox text contains valid hostname.
- Parameters
-
- Returns
- True if text is valid, false otherwise.
HostnamePattern
static bool SSQLE.ConnectionManager.ValidateTextBoxForIdentifier |
( |
TextBox |
textBox | ) |
|
|
static |
Checks whether given textBox text contains valid identifier.
- Parameters
-
- Returns
- True if text is valid, false otherwise.
IdentifierPattern
static bool SSQLE.ConnectionManager.ValidateTextBoxForPort |
( |
TextBox |
textBox | ) |
|
|
staticprivate |
Checks whether given textBox text contains valid port, that is number between PortMin and PortMax inclusive.
- Parameters
-
- Returns
- True if text is valid, false otherwise.
PortMin PortMax
static bool SSQLE.ConnectionManager.ValidateTextBoxForSid |
( |
TextBox |
textBox | ) |
|
|
staticprivate |
Checks whether given textBox text contains valid SID. Decays to ValidateTextBoxForIdentifier.
- Parameters
-
- Returns
- True if text is valid, false otherwise.
System.Windows.Forms.Button SSQLE.ConnectionManager.cm_connect |
|
private |
System.Windows.Forms.Button SSQLE.ConnectionManager.cm_delete |
|
private |
System.Windows.Forms.TextBox SSQLE.ConnectionManager.cm_host |
|
private |
System.Windows.Forms.Label SSQLE.ConnectionManager.cm_host_lbl |
|
private |
System.Windows.Forms.TextBox SSQLE.ConnectionManager.cm_name |
|
private |
System.Windows.Forms.Label SSQLE.ConnectionManager.cm_name_lbl |
|
private |
System.Windows.Forms.TextBox SSQLE.ConnectionManager.cm_pass |
|
private |
System.Windows.Forms.Label SSQLE.ConnectionManager.cm_pass_lbl |
|
private |
System.Windows.Forms.TextBox SSQLE.ConnectionManager.cm_port |
|
private |
System.Windows.Forms.Label SSQLE.ConnectionManager.cm_port_lbl |
|
private |
System.Windows.Forms.ComboBox SSQLE.ConnectionManager.cm_profiles |
|
private |
System.Windows.Forms.Button SSQLE.ConnectionManager.cm_save |
|
private |
System.Windows.Forms.TextBox SSQLE.ConnectionManager.cm_sid |
|
private |
System.Windows.Forms.Label SSQLE.ConnectionManager.cm_sid_lbl |
|
private |
System.Windows.Forms.TextBox SSQLE.ConnectionManager.cm_user |
|
private |
System.Windows.Forms.Label SSQLE.ConnectionManager.cm_user_lbl |
|
private |
System.ComponentModel.IContainer SSQLE.ConnectionManager.components = null |
|
private |
Required designer variable.
readonly Regex SSQLE.ConnectionManager.HostnamePattern = new Regex("([a-zA-Z_0-9-]+)((\\.|::?)[a-zA-Z_0-9-]+)*") |
|
staticprivate |
Regular expression pattern used to validate hostname. Matches hostname, IPv4 or IPV6 address
It is not perfect, but it is sufficent to reject nonsense.
readonly Regex SSQLE.ConnectionManager.IdentifierPattern = new Regex("[a-zA-Z0-9_]+") |
|
staticprivate |
Regular expression pattern used to validate identifier. Identifier has to be at least one character long and must contain only alpha numeric characters and underscore.
const int SSQLE.ConnectionManager.PortMax = 65535 |
|
private |
Maximal value for port argument.
const int SSQLE.ConnectionManager.PortMin = 0 |
|
private |
Minimal value for port argument.
The documentation for this class was generated from the following files: