private bool DoValidateControls() { string msg = string.Empty; if (string.IsNullOrWhiteSpace(CNTextField.StringValue)) { msg = VMDirConstants.WRN_CN_ENT; } else if (string.IsNullOrWhiteSpace(FirstNameTextField.StringValue)) { msg = VMDirConstants.WRN_FN_ENT; } else if (string.IsNullOrWhiteSpace(LastNameTextField.StringValue)) { msg = VMDirConstants.WRN_LN_ENT; } else if (string.IsNullOrWhiteSpace(sAMAccountNameTextField.StringValue)) { msg = VMDirConstants.WRN_SAM_NAME_ENT; } else if (string.IsNullOrWhiteSpace(UPNTextField.StringValue)) { msg = VMDirConstants.WRN_UPN_ENT; } if (!string.IsNullOrWhiteSpace(msg)) { UIErrorHelper.ShowWarning(msg); return(false); } return(true); }
private bool Validate() { int ps; if (string.IsNullOrWhiteSpace(PageSizeTextField.StringValue)) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_PAGE_SIZE); return(false); } if (int.TryParse(PageSizeTextField.StringValue, out ps)) { if (ps <= 0) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_PAGE_SIZE_MINVAL); return(false); } else if (ps > VMDirConstants.DEFAULT_PAGE_SIZE * 10) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_PAGE_SIZE_MAXVAL); return(false); } else { return(true); } } else { UIErrorHelper.ShowWarning(VMDirConstants.WRN_INT_VAL); return(false); } }
private bool ValidateSearch() { if (string.IsNullOrWhiteSpace(this.SearchBaseTextField.StringValue)) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_SEARCH_BASE); return(false); } if (SearchScopeComboBox.SelectedValue == null) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_SEARCH_SCOPE); return(false); } if (BfOperatorComboBox.SelectedValue == null) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_OP); return(false); } if (SearchQueryTabView.IndexOf(SearchQueryTabView.Selected) == 0 && BfConditionsTableView.RowCount <= 0) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_COND_COUNT); return(false); } if (SearchQueryTabView.IndexOf(SearchQueryTabView.Selected) == 1 && string.IsNullOrWhiteSpace(TfSearchFilterTextView.Value)) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_TEXT_FILTER); return(false); } return(true); }
public void GetNextPage() { if (morePages) GetPage(); else UIErrorHelper.ShowWarning(VMDirConstants.WRN_NO_MORE_PAGES); }
private bool isObjectSelected(nint row) { if (row < (nint)0) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_OBJ_NODE_SEL); return(false); } else { return(true); } }
partial void OnOKButton(Foundation.NSObject sender) { if (!string.IsNullOrWhiteSpace(DnLabel.StringValue)) { DNText = DnLabel.StringValue; this.Close(); NSApplication.SharedApplication.StopModalWithCode(1); } else { UIErrorHelper.ShowWarning(VMDirConstants.WRN_GRP_NAME_SEL); } }
public void OnClickSelectButton(object sender, EventArgs e) { nint row = AddObjectTableView.SelectedRow; if (row >= (nint)0) { _selectedObject = _list[(int)row]; this.Close(); NSApplication.SharedApplication.StopModalWithCode(1); } else { UIErrorHelper.ShowWarning(VMDirConstants.WRN_OC_SEL); } }
private bool DoValidate() { if (string.IsNullOrWhiteSpace(ParentDnTextField.StringValue)) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_DN_ENT); return(false); } if (string.IsNullOrWhiteSpace(RdnTextField.StringValue)) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_RDN_ENT); return(false); } var requiredPropsNotFilled = _properties.Where(x => { var val = x.Value.Values; if (val == null) { return(true); } else if (val.Count <= 0) { return(true); } else { var flag = false; foreach (LdapValue item in val) { if (string.IsNullOrEmpty(item.StringValue)) { flag = true; } } return(flag); } }); if (requiredPropsNotFilled.Count() > 0) { string error = string.Format("{0} is empty", requiredPropsNotFilled.First().Key); UIErrorHelper.ShowWarning(error); return(false); } return(true); }
bool ValidateExport() { if (FormatComboBox.SelectedValue == null) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_FILE_FORMAT); return(false); } if (ScopeComboBox.SelectedValue == null) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_SCOPE); return(false); } if (AllReturnAttrCheckBox.State == NSCellStateValue.Off && _attrToExportDs.attrList.Count <= 0) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_ATTR); return(false); } return(true); }
private bool ValidateAdd() { if (BfAttributeComboBox.SelectedValue == null) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_ATTR); return(false); } if (BfConditionComboBox.SelectedValue == null) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_COND); return(false); } if (string.IsNullOrWhiteSpace(BfValueTextField.StringValue)) { UIErrorHelper.ShowWarning(VMDirConstants.WRN_VAL); return(false); } return(true); }
private bool DoValidateControls() { string msg = string.Empty; if (String.IsNullOrWhiteSpace(GroupNameTextField.StringValue)) { msg = VMDirConstants.WRN_GRP_NAME_ENT; } else if (String.IsNullOrWhiteSpace(SAMAccountNameTextField.StringValue)) { msg = VMDirConstants.WRN_SAM_NAME_ENT; } if (!string.IsNullOrWhiteSpace(msg)) { UIErrorHelper.ShowWarning(msg); return(false); } return(true); }
private bool ValidateControls() { string msg = string.Empty; if (string.IsNullOrWhiteSpace(this.UpnTextField.StringValue)) { msg = VMDirConstants.WRN_UPN_ENT; } else if (String.IsNullOrWhiteSpace(this.PwdTextField.StringValue)) { msg = VMDirConstants.WRN_PWD_ENT; } if (!string.IsNullOrWhiteSpace(msg)) { UIErrorHelper.ShowWarning(msg); return(false); } return(true); }
private bool ValidateControls() { var msg = string.Empty; if (string.IsNullOrWhiteSpace(this.DnTextField.StringValue)) { msg = VMDirConstants.WRN_PWD_ENT; } else if (String.IsNullOrWhiteSpace(NewPasswordTextField.StringValue)) { msg = VMDirConstants.WRN_NEW_PWD_ENT; } else if (!string.Equals(this.NewPasswordTextField.StringValue, this.ConfirmPasswordTextField.StringValue)) { msg = VMDirConstants.WRN_PWD_NO_MATCH; } if (!string.IsNullOrWhiteSpace(msg)) { UIErrorHelper.ShowWarning(msg); return(false); } return(true); }
private bool ValidateDto() { string msg = string.Empty; if (string.IsNullOrEmpty(_dto.Server)) { msg = VMDirConstants.WRN_SERVER_ENT; } else if (string.IsNullOrEmpty(_dto.BindDN)) { msg = VMDirConstants.WRN_UPN_ENT; } else if (string.IsNullOrEmpty(_dto.Password)) { msg = VMDirConstants.WRN_PWD_ENT; } if (!string.IsNullOrWhiteSpace(msg)) { UIErrorHelper.ShowWarning(msg); return(false); } return(true); }
partial void OnClickAction(NSObject sender) { UIErrorHelper.ShowWarning(VmdirOutlineView.SelectedTag.ToString()); }