Пример #1
0
        public void DecrementFriday(object item)
        {
            ProjectTimeDataViewModel projectTimeData = item as ProjectTimeDataViewModel;

            projectTimeData.FridayTime -= incrementValue;
            SaveProjectTimeData();

            FridayTotal -= incrementValue;
        }
Пример #2
0
        public void IncrementWednesday(object item)
        {
            ProjectTimeDataViewModel projectTimeData = item as ProjectTimeDataViewModel;

            projectTimeData.WednesdayTime += incrementValue;
            SaveProjectTimeData();

            WednesdayTotal += incrementValue;
        }
Пример #3
0
        public bool CanExecute(object parameter)
        {
            if (parameter == null)
            {
                return(false);
            }

            ProjectTimeDataViewModel item = parameter as ProjectTimeDataViewModel;

            return(item.FridayTime > 0);
        }
Пример #4
0
 public ProjectTimeData(ProjectTimeDataViewModel p)
 {
     DisplayName = p.DisplayName;
     ChargeNumber = p.ChargeNumber;
     MondayTime = p.MondayTime;
     TuesdayTime = p.TuesdayTime;
     WednesdayTime = p.WednesdayTime;
     ThursdayTime = p.ThursdayTime;
     FridayTime = p.FridayTime;
     TotalLoggedTime = p.TotalLoggedTime;
     MondayNotes = p.MondayNotes;
     TuesdayNotes = p.TuesdayNotes;
     WednesdayNotes = p.WednesdayNotes;
     ThursdayNotes = p.ThursdayNotes;
     FridayNotes = p.FridayNotes;
 }
Пример #5
0
        /// <summary>
        /// Removes account data item from <see cref="Items"/>
        /// </summary>
        /// <param name="item"><see cref="ProjectTimeDataViewModel"/> to remove</param>
        private async void RemoveItem(object item)
        {
            await Task.Delay(RemoveItemDelayMs);

            ProjectTimeDataViewModel p = item as ProjectTimeDataViewModel;

            MondayTotal    -= p.MondayTime;
            TuesdayTotal   -= p.TuesdayTime;
            WednesdayTotal -= p.WednesdayTime;
            ThursdayTotal  -= p.ThursdayTime;
            FridayTotal    -= p.FridayTime;

            Items.Remove(item as ProjectTimeDataViewModel);

            SaveProjectTimeData();
        }
Пример #6
0
        /// <summary>
        /// Adds account data item to <see cref="Items"/>
        /// </summary>
        /// <param name="item"><see cref="ProjectTimeDataViewModel"/> to add</param>
        public void AddItem(string displayName, string chargeNumber)
        {
            ItemAdded = false;

            try
            {
                ProjectTimeDataViewModel projectTimeData = new ProjectTimeDataViewModel()
                {
                    DisplayName = displayName, ChargeNumber = chargeNumber
                };
                Items.Add(projectTimeData);

                SaveProjectTimeData();

                ItemAdded = true;
            }
            catch { }
        }