public override void OK() { IntArrayList uins = IntArrayListPool.Alloc(); try { foreach (ListViewItem item in _UINsList.Items) { if (item.Checked) { uins.Add((int)item.Tag); } } uins.Sort(); bool changed = (uins.Count != _uins.Count); if (!changed) { for (int i = 0; i < uins.Count; ++i) { if (uins[i] != _uins[i]) { changed = true; break; } } } if (!IsStartupPane) { ICQPlugin.SetBuildConverstionOnline(_indexOnlineCheckBox.Checked); ICQPlugin.SetReverseMode(_reverseModeCheckBox.Checked); } if (!IsStartupPane && _convsTimeSpan.Value != _minutes) { ICQPlugin.SetConversationTimeSpan( new TimeSpan(((long)_convsTimeSpan.Value) * 60 * 10000000)); changed = true; } changed = changed || _importOnly2003bCheckbox.Checked != ICQPlugin.GetImportOnly2003b() || (_indexOnlineCheckBox.Checked && _indexOnlineCheckBox.Checked != ICQPlugin.GetBuildConverstionOnline()); ICQPlugin.SetImportOnly2003b(_importOnly2003bCheckbox.Checked); // rebuild conversations if there were changes if (changed || IsStartupPane) { ICQPlugin.SetUpdateDates(DateTime.MaxValue, DateTime.MinValue); ICQPlugin.SaveUINs2BeIndexed(uins); if (!IsStartupPane) { ICQPlugin.AsyncUpdateHistory(); } } } finally { IntArrayListPool.Dispose(uins); } }
private void _okButton_Click(object sender, System.EventArgs e) { IntArrayList uins = IntArrayListPool.Alloc(); try { foreach (ListViewItem item in _UINsList.Items) { int uin = (int)item.Tag; if (item.Checked || ICQPlugin.IndexedUIN(uin)) { uins.Add(uin); } } ICQPlugin.SetUpdateDates(DateTime.MaxValue, DateTime.MinValue); ICQPlugin.SaveUINs2BeIndexed(uins); ICQPlugin.AsyncUpdateHistory(); } finally { IntArrayListPool.Dispose(uins); } }