public bool ValidateUserInput() { bool isValidate = true; string inputNeedToEncryptStr = this.NeedDataEncryptData_TB.Text.Trim(); string dataEncryptOperator =string.Empty; if (DataEncryptType_LP != null) dataEncryptOperator = (this.DataEncryptType_LP.SelectedItem as ListPickerItem).Content as string; if (string.IsNullOrEmpty(inputNeedToEncryptStr)) { MessageBox.Show("Please input the Data you want to Encrypt ?", "Confirm Input", MessageBoxButton.OK); this.NeedDataEncryptData_TB.Focus(); isValidate = false; } else if (!string.IsNullOrEmpty(dataEncryptOperator)) { PopupCotainer newPopupContainer = new PopupCotainer(this); if (dataEncryptOperator.Equals("HMAC_MD5")) newPopupContainer.Show(new DataEncryptKey()); } return isValidate; }
private void DataEncryptType_LP_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (DataEncryptType_LP == null) return; string dataEncryptOperator = (this.DataEncryptType_LP.SelectedItem as ListPickerItem).Content as string; if (string.IsNullOrEmpty(dataEncryptOperator)) return; PopupCotainer newPopupContainer=new PopupCotainer(this); if (dataEncryptOperator.Equals("HMAC_MD5")) newPopupContainer.Show(new DataEncryptKey()); }