private static void UpdateComment(this ListViewItem item, IPhoneProvider wrapper, string comment) { var xmlItem = wrapper.TelephoneItems.Find(x => x.Telephone == item.Text); xmlItem.Comment = comment; item.SubItems[3].Text = xmlItem.Comment; }
public MainForm() { InitializeComponent(); _workingDirectory = DefineWorkingDirectory(); Logger.WorkingDirectory = CPassword.WorkingDirectory = _portReader.WorkingDirectory = _workingDirectory; _xmlWrapper = new XmlPhoneProvider(_workingDirectory); }
public static void UpdateDateActivatedSelected(this ListView listView, IPhoneProvider wrapper, DateTime?date) { if (listView.SelectedItems.Count != 0) { foreach (ListViewItem item in listView.SelectedItems) { item.UpdateDateActivated(wrapper, date); } } }
private static void UpdateDateActivated(this ListViewItem item, IPhoneProvider wrapper, DateTime?date) { var xmlItem = wrapper.TelephoneItems.Find(x => x.Telephone == item.Text); if (date.HasValue) { xmlItem.SetDateActivated(date.Value); item.ImageIndex = 0; } else { xmlItem.DateActivated = String.Empty; item.ImageIndex = -1; } item.SubItems[2].Text = xmlItem.DateActivated; }
public static void UpdateComment(this ListView listView, IPhoneProvider wrapper, string telephone, string comment) { var item = listView.FindItem(telephone); item.UpdateComment(wrapper, comment); }
public static void UpdateDateActivated(this ListView listView, IPhoneProvider wrapper, string telephone, DateTime?date) { var item = listView.FindItem(telephone); item.UpdateDateActivated(wrapper, date); }