public void OnOkClicked(object o, EventArgs args) { LdapEntry entry = null; if (isEdit) { entry = CreateEntry(currentEntry.DN); LdapEntryAnalyzer lea = new LdapEntryAnalyzer(); lea.Run(currentEntry, entry); if (lea.Differences.Length == 0) { return; } if (!Util.ModifyEntry(conn, entry.DN, lea.Differences)) { errorOccured = true; } } else { string userDN = null; if (string.IsNullOrEmpty(this.defaultNewContainer)) { SelectContainerDialog scd = new SelectContainerDialog(conn, groupDialog); scd.Title = "Save Group"; scd.Message = String.Format("Where in the directory would\nyou like save the group\n{0}?", groupNameEntry.Text); scd.Run(); if (string.IsNullOrEmpty(scd.DN)) { return; } userDN = String.Format("cn={0},{1}", groupNameEntry.Text, scd.DN); } else { userDN = String.Format("cn={0},{1}", groupNameEntry.Text, this.defaultNewContainer); } entry = CreateEntry(userDN); string[] missing = LdapEntryAnalyzer.CheckRequiredAttributes(conn, entry); if (missing.Length != 0) { missingAlert(missing); missingValues = true; return; } if (!Util.AddEntry(conn, entry)) { errorOccured = true; } } }
public void OnSearchBaseClicked(object o, EventArgs args) { TreeIter iter; if (!serverComboBox.GetActiveIter(out iter)) { return; } string profileName = (string)serverComboBox.Model.GetValue(iter, 0); Connection conn = Global.Connections [profileName]; try { SelectContainerDialog scd = new SelectContainerDialog(conn, mainWindow); scd.Message = String.Format(Mono.Unix.Catalog.GetString("Where in the directory would\nyou like to start the search?")); scd.Title = Mono.Unix.Catalog.GetString("Select search base"); scd.Run(); if (!scd.DN.Equals("") && !scd.DN.Equals(conn.Settings.Host)) { searchBaseButton.Label = scd.DN; searchButton.Sensitive = true; } } catch {} }
public void OnSearchBaseClicked(object o, EventArgs args) { SelectContainerDialog scd = new SelectContainerDialog(conn, null); scd.Message = String.Format(Mono.Unix.Catalog.GetString("Select a search base")); scd.Title = Mono.Unix.Catalog.GetString("Select container"); scd.Run(); if (!scd.DN.Equals("") && !scd.DN.Equals(conn.Settings.Host)) { searchBaseButton.Label = scd.DN; } }
void SelectContainer(string msg, string title, Gtk.Entry entry) { Connection conn = GetCurrentConnection(); SelectContainerDialog scd = new SelectContainerDialog(conn, sambaPopulateDialog); scd.Message = msg; scd.Title = title; scd.Run(); if (!scd.DN.Equals("") && !scd.DN.Equals(conn.Settings.Host)) { entry.Text = scd.DN; } }
public void OnBrowseClicked(object o, EventArgs args) { SelectContainerDialog scd = new SelectContainerDialog(conn, createEntryDialog); scd.Message = String.Format( Mono.Unix.Catalog.GetString( "Where in the directory would\nyou like to save the entry?")); scd.Title = Mono.Unix.Catalog.GetString("Select entry base"); scd.Run(); if (!scd.DN.Equals("") && !scd.DN.Equals(conn.Settings.Host)) { browseButton.Label = scd.DN; } }
public void OnOkClicked(object o, EventArgs args) { LdapEntry entry = null; string userDN = null; if (!IsUserNameAvailable() || !IsUIDAvailable() || (IsPasswordEmpty() && dontRequirePasswords == false)) { errorOccured = true; return; } if (this.defaultNewContainer == null) { SelectContainerDialog scd = new SelectContainerDialog(conn, newUserDialog); scd.Title = "Save Group"; scd.Message = String.Format("Where in the directory would\nyou like save the user\n{0}", displayNameEntry.Text); scd.Run(); if (scd.DN == "") { return; } userDN = String.Format("cn={0},{1}", displayNameEntry.Text, scd.DN); } else { userDN = String.Format("cn={0},{1}", displayNameEntry.Text, this.defaultNewContainer); } entry = CreateEntry(userDN); string[] missing = LdapEntryAnalyzer.CheckRequiredAttributes(conn, entry); if (missing.Length != 0) { missingAlert(missing); missingValues = true; return; } updateGroupMembership(); if (!Util.AddEntry(conn, entry)) { errorOccured = true; } }
public void OnManChangeClicked(object o, EventArgs args) { SelectContainerDialog scd = new SelectContainerDialog(conn, editAdComputerDialog); scd.Title = "Save Computer"; scd.Message = Mono.Unix.Catalog.GetString( "Select a user who will manage ") + computerNameLabel.Text; scd.Run(); if (scd.DN == "") { return; } else { manNameEntry.Text = scd.DN; updateManagedBy(scd.DN); } }
public void OnOkClicked(object o, EventArgs args) { LdapEntry entry = null; string userDN = null; if (this.defaultNewContainer == null) { SelectContainerDialog scd = new SelectContainerDialog(conn, newContactDialog); scd.Title = "Save Group"; scd.Message = String.Format("Where in the directory would\nyou like save the contact\n{0}?", gnDisplayName.Text); scd.Run(); if (scd.DN == "") { return; } userDN = String.Format("cn={0},{1}", gnDisplayName.Text, scd.DN); } else { userDN = String.Format("cn={0},{1}", gnDisplayName.Text, this.defaultNewContainer); } entry = CreateEntry(userDN); string[] missing = LdapEntryAnalyzer.CheckRequiredAttributes(conn, entry); if (missing.Length != 0) { missingAlert(missing); missingValues = true; return; } if (!Util.AddEntry(conn, entry)) { errorOccured = true; } }
public void OnExportActivate(object o, EventArgs args) { Connection conn = GetActiveConnection(); if (conn == null) { return; } SelectContainerDialog scd = new SelectContainerDialog(conn, mainWindow); scd.Title = Mono.Unix.Catalog.GetString("Export entry"); scd.Message = Mono.Unix.Catalog.GetString("Select the container you wish to export."); scd.Run(); if (scd.DN.Equals("")) { return; } Util.ExportData(conn, mainWindow, scd.DN); }
public void OnSearchBaseClicked(object o, EventArgs args) { SelectContainerDialog scd = new SelectContainerDialog (conn, null); scd.Message = String.Format (Mono.Unix.Catalog.GetString ("Select a search base")); scd.Title = Mono.Unix.Catalog.GetString ("Select container"); scd.Run (); if (!scd.DN.Equals ("") && !scd.DN.Equals (conn.Settings.Host)) searchBaseButton.Label = scd.DN; }
public void OnManChangeClicked(object o, EventArgs args) { SelectContainerDialog scd = new SelectContainerDialog (conn, editAdComputerDialog); scd.Title = "Save Computer"; scd.Message = Mono.Unix.Catalog.GetString ( "Select a user who will manage ") + computerNameLabel.Text; scd.Run (); if (scd.DN == "") { return; } else { manNameEntry.Text = scd.DN; updateManagedBy (scd.DN); } }
public void OnBrowseClicked(object o, EventArgs args) { SelectContainerDialog scd = new SelectContainerDialog (conn, createEntryDialog); scd.Message = String.Format ( Mono.Unix.Catalog.GetString ( "Where in the directory would\nyou like to save the entry?")); scd.Title = Mono.Unix.Catalog.GetString ("Select entry base"); scd.Run (); if (!scd.DN.Equals ("") && !scd.DN.Equals (conn.Settings.Host)) browseButton.Label = scd.DN; }
void SelectContainer(string msg, string title, Gtk.Entry entry) { Connection conn = GetCurrentConnection (); SelectContainerDialog scd = new SelectContainerDialog (conn, sambaPopulateDialog); scd.Message = msg; scd.Title = title; scd.Run (); if (!scd.DN.Equals ("") && !scd.DN.Equals (conn.Settings.Host)) entry.Text = scd.DN; }
public void OnOkClicked(object o, EventArgs args) { LdapEntry entry = null; string userDN = null; if (this.defaultNewContainer == null) { SelectContainerDialog scd = new SelectContainerDialog (conn, newContactDialog); scd.Title = "Save Group"; scd.Message = String.Format ("Where in the directory would\nyou like save the contact\n{0}?", gnDisplayName.Text); scd.Run (); if (scd.DN == "") return; userDN = String.Format ("cn={0},{1}", gnDisplayName.Text, scd.DN); } else { userDN = String.Format ("cn={0},{1}", gnDisplayName.Text, this.defaultNewContainer); } entry = CreateEntry (userDN); string[] missing = LdapEntryAnalyzer.CheckRequiredAttributes (conn, entry); if (missing.Length != 0) { missingAlert (missing); missingValues = true; return; } if (!Util.AddEntry (conn, entry)) errorOccured = true; }
public void OnOkClicked(object o, EventArgs args) { LdapEntry entry = null; if (isEdit) { entry = CreateEntry (currentEntry.DN); LdapEntryAnalyzer lea = new LdapEntryAnalyzer (); lea.Run (currentEntry, entry); if (lea.Differences.Length == 0) return; if (!Util.ModifyEntry (conn, entry.DN, lea.Differences)) errorOccured = true; } else { string userDN = null; if (string.IsNullOrEmpty(this.defaultNewContainer)) { SelectContainerDialog scd = new SelectContainerDialog (conn, groupDialog); scd.Title = "Save Group"; scd.Message = String.Format ("Where in the directory would\nyou like save the group\n{0}?", groupNameEntry.Text); scd.Run (); if (string.IsNullOrEmpty(scd.DN)) return; userDN = String.Format ("cn={0},{1}", groupNameEntry.Text, scd.DN); } else { userDN = String.Format ("cn={0},{1}", groupNameEntry.Text, this.defaultNewContainer); } entry = CreateEntry (userDN); string[] missing = LdapEntryAnalyzer.CheckRequiredAttributes (conn, entry); if (missing.Length != 0) { missingAlert (missing); missingValues = true; return; } if (!Util.AddEntry (conn, entry)) errorOccured = true; } }
public void OnOkClicked(object o, EventArgs args) { LdapEntry entry = null; string userDN = null; if (!IsUserNameAvailable() || !IsUIDAvailable() || (IsPasswordEmpty() && dontRequirePasswords == false)) { errorOccured = true; return; } if (this.defaultNewContainer == null) { SelectContainerDialog scd = new SelectContainerDialog (conn, newUserDialog); scd.Title = "Save Group"; scd.Message = String.Format ("Where in the directory would\nyou like save the user\n{0}", displayNameEntry.Text); scd.Run (); if (scd.DN == "") return; userDN = String.Format ("cn={0},{1}", displayNameEntry.Text, scd.DN); } else { userDN = String.Format ("cn={0},{1}", displayNameEntry.Text, this.defaultNewContainer); } entry = CreateEntry (userDN); string[] missing = LdapEntryAnalyzer.CheckRequiredAttributes (conn, entry); if (missing.Length != 0) { missingAlert (missing); missingValues = true; return; } updateGroupMembership (); if (!Util.AddEntry (conn, entry)) errorOccured = true; }