public static void NotifyCreated(CalendarBook obj) { var ctx = obj.Context; // sets the current principal as the default owner var principal = _principalResolver.GetCurrent(); obj.Owner = principal != null ? ctx.Find<Identity>(principal.ID) : null; }
public static void GetNewEventViewModels(CalendarBook obj, object /* I'm so sorry, Zetbox.Objects.dll cannot use custom classes */ args) { var eventArgs = (NewEventViewModelsArgs)args; eventArgs.ViewModels.Insert(0, eventArgs.ViewModelFactory.CreateViewModel<EventInputViewModel.Factory>() .Invoke(eventArgs.DataContext, eventArgs.Parent, obj, eventArgs.SelectedStartDate, eventArgs.IsAllDay)); // For testing only! //eventArgs.ViewModels.Add(eventArgs.ViewModelFactory.CreateViewModel<Zetbox.App.Projekte.Client.ViewModel.TestModule.EventTestInputViewModel.Factory>() // .Invoke(eventArgs.DataContext, eventArgs.Parent, obj, eventArgs.SelectedStartDate, eventArgs.IsAllDay)); }
public static void ToString(CalendarBook obj, MethodReturnEventArgs<System.String> e) { e.Result = obj.Name; }
public CalendarViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, CalendarBook calendar) : base(appCtx, dataCtx, parent, calendar) { this.Calendar = calendar; }
public NewEventDialogViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, CalendarBook calendar) : base(appCtx, dataCtx, parent) { Result = false; Calendar = calendar; }