Пример #1
0
        private void AddNewDragPlan()
        {
            XDragPlanVM newDragPlan = new XDragPlanVM(SelectedDragsKit);
            newDragPlan.Date = new DateTime(ActualDate.Date.Year, ActualDate.Date.Month, ActualDate.Date.Day, Hour, Minutes, 0);
            Client.AddDragPlan(newDragPlan);
            SaveChanges();

            if(Client.IsSynchronizeWithGCalendar)
            {
                XGCalendarAccess.CreateNewEvent(Client.GCalendarAdress, newDragPlan.Date, newDragPlan.Date, newDragPlan.NameKit, true, newDragPlan.DragKit.DragNamesToString());
            }

            ActualDate = DateTime.Now;
            RaisePropertyChanged("ActualDate");
        }
Пример #2
0
        internal void AddDragPlan(XDragPlanVM dragPlan)
        {
            if (dragPlan == null)
                throw new ArgumentException("Аргумент dragPlan не может быть null");

            this._dragPlanObsCollection.Add(dragPlan);
        }