示例#1
0
 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;
 }
示例#2
0
        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));
        }
示例#3
0
 public static void ToString(CalendarBook obj, MethodReturnEventArgs<System.String> e)
 {
     e.Result = obj.Name;
 }
示例#4
0
 public CalendarViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, CalendarBook calendar)
     : base(appCtx, dataCtx, parent, calendar)
 {
     this.Calendar = calendar;
 }
示例#5
0
 public NewEventDialogViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, CalendarBook calendar)
     : base(appCtx, dataCtx, parent)
 {
     Result = false;
     Calendar = calendar;
 }