void OnOkClicked(object o, EventArgs args) { if (!attributeEntry.Text.Equals("")) { TreeIter iter; if (!opComboBox.GetActiveIter(out iter)) { return; } string s = (string)opComboBox.Model.GetValue(iter, 0); // simple search; only one criteria _ls.addCondition( attributeEntry.Text, s, valueEntry.Text); } else { // complex search buildFilter(); } searchBuilderDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { if (templateRadioButton.Active) { TreeIter iter; if (!templateComboBox.GetActiveIter(out iter)) { return; } string name = (string)templateComboBox.Model.GetValue(iter, 0); Template t = Global.Templates.Lookup(name); new CreateEntryDialog(conn, t); } else { if (_dn == conn.Settings.Host) { return; } new CreateEntryDialog(conn, conn.Data.GetEntry(_dn)); } newEntryDialog.HideAll(); }
private void ldapDNSelected(object o, dnSelectedEventArgs args) { if (args.IsHost) { return; } _dn = args.DN; selectContainerDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { int hour = Convert.ToInt32(hourSpin.Value); int minute = Convert.ToInt32(minuteSpin.Value); int second = Convert.ToInt32(secondSpin.Value); DateTime dt = calendar.GetDate(); DateTime userDT = new DateTime(dt.Year, dt.Month, dt.Day, hour, minute, second); _time = Util.GetUnixTime(userDT); timeDateDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { if (isRelogin) { Relogin(); } else { userName = userEntry.Text; userPass = passEntry.Text; } loginDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { TreeModel model; TreeIter iter; TreePath[] tp = allGroupsTreeview.Selection.GetSelectedRows(out model); foreach (TreePath t in tp) { store.GetIter(out iter, t); string name = (string)store.GetValue(iter, 0); groups.Add(name); } selectGroupsDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { string oldDN = oldNameEntry.Text; string newDN = newNameEntry.Text; bool saveOld = saveOldNameCheckButton.Active; try { conn.Data.Rename(oldDN, newDN, saveOld); string msg = String.Format( Mono.Unix.Catalog.GetString( "Entry {0} has been renamed to {1}."), oldDN, newDN); HIGMessageDialog dialog = new HIGMessageDialog( renameEntryDialog, 0, Gtk.MessageType.Info, Gtk.ButtonsType.Ok, "Entry renamed", msg); dialog.Run(); dialog.Destroy(); renameHappened = true; } catch (Exception e) { string errorMsg = Mono.Unix.Catalog.GetString("Unable to rename entry ") + oldDN; errorMsg += "\nError: " + e.Message; HIGMessageDialog dialog = new HIGMessageDialog( renameEntryDialog, 0, Gtk.MessageType.Error, Gtk.ButtonsType.Ok, "Rename error", errorMsg); dialog.Run(); dialog.Destroy(); } renameEntryDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { Connection conn = GetCurrentConnection(); LdapEntry[] sr = conn.Data.Search(conn.DirectoryRoot, searchEntry.Text); foreach (object[] row in modListStore) { string _action = (string)row[0]; string _name = (string)row[1]; string _value = (string)row[2]; LdapAttribute a = new LdapAttribute(_name, _value); LdapModification m = null; switch (_action.ToLower()) { case "add": m = new LdapModification(LdapModification.ADD, a); break; case "delete": m = new LdapModification(LdapModification.DELETE, a); break; case "replace": m = new LdapModification(LdapModification.REPLACE, a); break; default: break; } if (m != null) { _modList.Add(m); } } foreach (LdapEntry e in sr) { Util.ModifyEntry(conn, e.DN, _modList.ToArray()); } massEditDialog.HideAll(); }
void Initialize(Window parent, String text) { var stream = Assembly .GetExecutingAssembly() .GetManifestResourceStream(AppController.Instance.Config.SourceDialog); var glade = new Glade.XML(stream, "UnhandledExceptionDialog", null); if (stream != null) { stream.Close(); } //Glade.XML glade = Glade.XML.FromAssembly("UnhandledExceptionDialog.glade","UnhandledExceptionDialog", null); //stream.Close(); glade.Autoconnect(this); _thisDialog = ((Dialog)(glade.GetWidget("UnhandledExceptionDialog"))); _thisDialog.Modal = true; _thisDialog.TransientFor = parent; _thisDialog.SetPosition (WindowPosition.Center); textview1.Buffer.Text = text; btnContinue.Clicked += (sender, e) => _thisDialog.HideAll(); btnUpload.Clicked += OnUpload; miSave.Activated += OnSave; miSaveAs.Activated += OnSaveAs; miQuit.Activated += (object sender, EventArgs e) => _thisDialog.HideAll(); miAbout.Activated += (object sender, EventArgs e) => new AboutDialog (_thisDialog).ShowDialog(); }
public void OnCloseClicked(object o, EventArgs args) { templatesDialog.HideAll(); }
public void OnCancelClicked(object o, EventArgs args) { errorOccured = false; createEntryDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { addObjectClassDialog.HideAll(); }
public void OnOkClicked(object o, EventArgs args) { // containers if (!checkDN(userOUEntry.Text)) { createOU(userOUEntry.Text); } if (!checkDN(groupOUEntry.Text)) { createOU(groupOUEntry.Text); } if (!checkDN(computerOUEntry.Text)) { createOU(computerOUEntry.Text); } if (!checkDN(idmapOUEntry.Text)) { createOU(idmapOUEntry.Text); } // users string dn = String.Format("cn={0},{1}", adminEntry.Text, userOUEntry.Text); createUser(dn, adminEntry.Text, "XXX", sidEntry.Text, "[U ]", "0", "0", "500", "512", "Netbios Domain Administrator"); dn = String.Format("cn={0},{1}", guestEntry.Text, userOUEntry.Text); createUser(dn, guestEntry.Text, "NO PASSWORDXXXXXXXXXXXXXXXXXXXXX", sidEntry.Text, "[NUD ]", "999", "514", "2998", "514", "Netbios Domain Administrator"); // groups dn = String.Format("cn=Domain Admins,{0}", groupOUEntry.Text); createGroup(dn, "512", "Netbios Domain Administrators", sidEntry.Text, "512", "2", adminEntry.Text); dn = String.Format("cn=Domain Users,{0}", groupOUEntry.Text); createGroup(dn, "513", "Netbios Domain Users", sidEntry.Text, "513", "2", ""); dn = String.Format("cn=Domain Guests,{0}", groupOUEntry.Text); createGroup(dn, "514", "Netbios Domain Guests", sidEntry.Text, "514", "2", ""); dn = String.Format("cn=Domain Computers,{0}", groupOUEntry.Text); createGroup(dn, "515", "Netbios Domain Computers", sidEntry.Text, "515", "2", ""); dn = String.Format("cn=Administrators,{0}", groupOUEntry.Text); createGroup(dn, "544", "Netbios Domain Members can fully administer the computer/sambaDomainName", "S-1-5-32", "544", "5", ""); dn = String.Format("cn=Account Operators,{0}", groupOUEntry.Text); createGroup(dn, "548", "Netbios Domain Users to manipulate users accounts", "S-1-5-32", "548", "5", ""); dn = String.Format("cn=Print Operators,{0}", groupOUEntry.Text); createGroup(dn, "550", "Netbios Domain Print Operators", "S-1-5-32", "550", "5", ""); dn = String.Format("cn=Backup Operators,{0}", groupOUEntry.Text); createGroup(dn, "551", "Netbios Domain Members can bypass file security to back up files", "S-1-5-32", "551", "5", ""); dn = String.Format("cn=Replicators,{0}", groupOUEntry.Text); createGroup(dn, "552", "Netbios Domain Supports file replication in a sambaDomainName", "S-1-5-32", "552", "5", ""); Connection conn = GetCurrentConnection(); dn = String.Format("sambaDomainName={0},{1}", domainEntry.Text, conn.DirectoryRoot); createDomain(dn, domainEntry.Text, sidEntry.Text); sambaPopulateDialog.HideAll(); }