Exemple #1
0
        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);
        }
Exemple #3
0
 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);
         }
     }
 }
Exemple #4
0
        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;
        }
Exemple #5
0
        public static void UpdateComment(this ListView listView, IPhoneProvider wrapper, string telephone, string comment)
        {
            var item = listView.FindItem(telephone);

            item.UpdateComment(wrapper, comment);
        }
Exemple #6
0
        public static void UpdateDateActivated(this ListView listView, IPhoneProvider wrapper, string telephone, DateTime?date)
        {
            var item = listView.FindItem(telephone);

            item.UpdateDateActivated(wrapper, date);
        }