/// <summary> /// Method to initailize the tab pages for the property sheet /// </summary> private void InitializePages() { MPPage page = null; page = new ObjectAddAttributesTab(_objectAddDlg); this.AddPage(page, new MPMenuItem(page.PageID, "Attributes", "Attributes"), MPMenu.POSITION_END); }
/// <summary> /// Method to initailize the tab pages for the property sheet /// </summary> private void InitializePages() { MPPage page = null; page = new ObjectAddAttributesTab(_objectAddDlg); this.AddPage(page, new MPMenuItem(page.PageID, "Attributes", "Attributes"), MPMenu.POSITION_END); }
/// <summary> /// Overriden constructor will get and initializes attribute list from the selected object class from the treeview /// </summary> /// <param name="objectAddDlg"></param> /// <param name="attrName"></param> public ObjectAddSinglePage(ADObjectAddDlg objectAddDlg, string attrName) : this() { this.Name = attrName; this._objectAddDlg = objectAddDlg; this.attrNameLabel.Text = attrName; SchemaType syntax = _objectAddDlg.schemaCache.GetSchemaTypeByDisplayName(attrName); if (syntax != null) { this.cnSyntaxlabel.Text = ObjectAddAttributesTab.GetADSTypeString(syntax); } pageName = attrName; this.cntextBox.Text = ""; }
/// <summary> /// Method to call the Apply functionality for each of tab pages of type MPage. /// </summary> /// <param name="actionCause"></param> /// <returns></returns> protected override bool Apply(EditDialogAction actionCause) { foreach (MPPage page in this.GetPages()) { if (page != null) { IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage; if (page.PageID.Trim().Equals("ObjectAddAttributesTab")) { ObjectAddAttributesTab _AddAttributesPage = (ObjectAddAttributesTab)page; if (_AddAttributesPage.OnApply()) { return(true); } else { return(false); } } } } return(true); }
public override string OnWizardNext() { string Message; string AttrSyntax = this.cnSyntaxlabel.Text.ToString(); string Attrvalue = this.cntextBox.Text.ToString(); if (AttrSyntax != "" && Attrvalue != "") { bool bSuccess = ObjectAddAttributesTab.ValidateData(Attrvalue, AttrSyntax, out Message); if (!bSuccess) { MessageBox.Show( this, Message, CommonResources.GetString("Caption_Console"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); this.cntextBox.Clear(); this.cntextBox.Focus(); return(WizardDialog.NoPageChange); } } if (_objectAddDlg.objectInfo.htMandatoryAttrList.ContainsKey(this.attrNameLabel.Text.Trim())) { _objectAddDlg.objectInfo.htMandatoryAttrList.Remove(this.attrNameLabel.Text.Trim()); } _objectAddDlg.objectInfo.htMandatoryAttrList.Add(this.attrNameLabel.Text.Trim(), this.cntextBox.Text); if (_objectAddDlg.objectInfo.addedPages.Count != 0 && _objectAddDlg.objectInfo.addedPages.Count > ObjectInfo.PageIndex) { return(_objectAddDlg.objectInfo.addedPages[ObjectInfo.PageIndex++]); } return(base.OnWizardNext()); }