private void LoginButton_Click(object sender, RoutedEventArgs e) { if (Username.Length == 0) { UsernameTextBox.Focus(); return; } if (Password.Length == 0) { PasswordTextBox.Focus(); return; } string macAddress = MacAddress; if (macAddress != null && macAddress != HardwareHash.Empty && !macAddressRegex.IsMatch(macAddress)) { MacAddressTextBox.Focus(); return; } if (HasProxy) { int port; if (int.TryParse(ProxyPortTextBox.Text.Trim(), out port) && port >= 0 && port <= 65535) { ProxyPort = port; DialogResult = true; } } else { DialogResult = true; } }
void ReleaseDesignerOutlets() { if (AddButton != null) { AddButton.Dispose(); AddButton = null; } if (FullNameTextBox != null) { FullNameTextBox.Dispose(); FullNameTextBox = null; } if (MacAddressMessageBox != null) { MacAddressMessageBox.Dispose(); MacAddressMessageBox = null; } if (MacAddressTextBox != null) { MacAddressTextBox.Dispose(); MacAddressTextBox = null; } if (PermissionButton != null) { PermissionButton.Dispose(); PermissionButton = null; } if (PermissionMessageBox != null) { PermissionMessageBox.Dispose(); PermissionMessageBox = null; } if (UsernameTextBox != null) { UsernameTextBox.Dispose(); UsernameTextBox = null; } }
void ReleaseDesignerOutlets() { if (FullNameActionButton != null) { FullNameActionButton.Dispose(); FullNameActionButton = null; } if (FullNameCancelButton != null) { FullNameCancelButton.Dispose(); FullNameCancelButton = null; } if (FullNameTextBox != null) { FullNameTextBox.Dispose(); FullNameTextBox = null; } if (InformationLabel != null) { InformationLabel.Dispose(); InformationLabel = null; } if (MacAddressActionButton != null) { MacAddressActionButton.Dispose(); MacAddressActionButton = null; } if (MacAddressCancelButton != null) { MacAddressCancelButton.Dispose(); MacAddressCancelButton = null; } if (MacAddressTextBox != null) { MacAddressTextBox.Dispose(); MacAddressTextBox = null; } if (PasswordActionButton != null) { PasswordActionButton.Dispose(); PasswordActionButton = null; } if (PasswordCancelButton != null) { PasswordCancelButton.Dispose(); PasswordCancelButton = null; } if (PasswordTextBox != null) { PasswordTextBox.Dispose(); PasswordTextBox = null; } if (PiConnectionStringTextBox != null) { PiConnectionStringTextBox.Dispose(); PiConnectionStringTextBox = null; } if (SignOutButton != null) { SignOutButton.Dispose(); SignOutButton = null; } if (UsernameTextBox != null) { UsernameTextBox.Dispose(); UsernameTextBox = null; } }
void ReleaseDesignerOutlets() { if (ActionControl != null) { ActionControl.Dispose(); ActionControl = null; } if (FullNameLabel != null) { FullNameLabel.Dispose(); FullNameLabel = null; } if (FullNameTextBox != null) { FullNameTextBox.Dispose(); FullNameTextBox = null; } if (InformationLabel != null) { InformationLabel.Dispose(); InformationLabel = null; } if (MacAddressLabel != null) { MacAddressLabel.Dispose(); MacAddressLabel = null; } if (MacAddressTextBox != null) { MacAddressTextBox.Dispose(); MacAddressTextBox = null; } if (PasswordTextBox != null) { PasswordTextBox.Dispose(); PasswordTextBox = null; } if (ReadyButton != null) { ReadyButton.Dispose(); ReadyButton = null; } if (SignInView != null) { SignInView.Dispose(); SignInView = null; } if (UsernameTextBox != null) { UsernameTextBox.Dispose(); UsernameTextBox = null; } }