private void on_EditPhbNumberEntry_changed(object o, EventArgs args) { if (eventsEnabled) { ArrayList al = ItemView.GetSelections(ALL_COLUMNS); // if single contact selected if (al.Count > 0) { UpdateButton.Sensitive = true; } else { AddButton.Sensitive = true; ClearButton.Sensitive = true; } } }
private void on_ok_button_clicked(object o, EventArgs args) { ArrayList lsdest = new ArrayList(); ArrayList bsdest = new ArrayList(); ArrayList contacts = new ArrayList(); lsdest = ls.GetSelections(ALL_COLUMNS); // if there are indiviual entries don't do entire phonebooks if (lsdest.Count > 0) { IEnumerator enu = lsdest.GetEnumerator(); while (enu.MoveNext()) { GfaxContact c = new GfaxContact(); c.Organization = (string)enu.Current; enu.MoveNext(); c.PhoneNumber = (string)enu.Current; enu.MoveNext(); c.ContactPerson = (string)enu.Current; gfax.Destinations.Add(c); } } else { bsdest = bs.GetSelections(COLUMN_0); if (bsdest.Count > 0) { IEnumerator enu = bsdest.GetEnumerator(); while (enu.MoveNext()) { foreach (Phonebook p in myPhoneBooks) { if (p.Name == (string)enu.Current) { contacts = Phonetools.get_contacts(p); } } // add contacts to global desinations if (contacts.Count > 0) { IEnumerator enuc = contacts.GetEnumerator(); while (enuc.MoveNext()) { gfax.Destinations.Add((GfaxContact)enuc.Current); } } } } } phbd.Destroy(); }
// Double click (Send tab) private void on_StatusList_row_activated(object o, RowActivatedArgs args) { modify_job(lv.GetSelections(ALL_COLUMNS), "sendq"); }