Exemple #1
0
 public static void preSet_KickOffBis(Projekt obj, PropertyPreSetterEventArgs<DateTime?> e)
 {
     if (e.NewValue.HasValue)
     {
         e.Result = obj.KickOffAm.Date + e.NewValue.Value.TimeOfDay;
     }
 }
Exemple #2
0
 public static void preSet_KickOffBis(Projekt obj, PropertyPreSetterEventArgs <DateTime?> e)
 {
     if (e.NewValue.HasValue)
     {
         e.Result = obj.KickOffAm.Date + e.NewValue.Value.TimeOfDay;
     }
 }
Exemple #3
0
 public static void preSet_Data(Sequence obj, PropertyPreSetterEventArgs<SequenceData> e)
 {
     // TODO: Workaroud: No! Changing Sequence Data is not allowed
     if (e.OldValue != null)
     {
         e.Result = e.OldValue;
     }
 }
Exemple #4
0
 public static void preSet_Data(Sequence obj, PropertyPreSetterEventArgs <SequenceData> e)
 {
     // TODO: Workaroud: No! Changing Sequence Data is not allowed
     if (e.OldValue != null)
     {
         e.Result = e.OldValue;
     }
 }
Exemple #5
0
        public static void preSet_Blob(Zetbox.App.GUI.Icon obj, PropertyPreSetterEventArgs<Zetbox.App.Base.Blob> e)
        {
            // Delete old blob
            if (e.OldValue != null && e.OldValue != e.NewValue)
            {
                obj.Context.Delete(e.OldValue);
            }

            e.Result = e.NewValue;
        }
Exemple #6
0
        public static void preSet_Blob(Zetbox.App.GUI.Icon obj, PropertyPreSetterEventArgs <Zetbox.App.Base.Blob> e)
        {
            // Delete old blob
            if (e.OldValue != null && e.OldValue != e.NewValue)
            {
                obj.Context.Delete(e.OldValue);
            }

            e.Result = e.NewValue;
        }
Exemple #7
0
 public static void preSet_Workflow(WFInstance obj, PropertyPreSetterEventArgs <Zetbox.Basic.Workflow.WFDefinition> e)
 {
     if (e.OldValue == null)
     {
         return;                     // OK
     }
     if (e.OldValue != e.NewValue)
     {
         throw new NotSupportedException("Changing the workflow is not supported");
     }
 }
Exemple #8
0
 public static void preSet_Blob(at.dasz.DocumentManagement.File obj, PropertyPreSetterEventArgs <Zetbox.App.Base.Blob> e)
 {
     e.Result = obj.HandleBlobChange(e.OldValue, e.NewValue);
 }
Exemple #9
0
 public static void preSet_IsFileReadonly(File obj, PropertyPreSetterEventArgs<bool> e)
 {
     if (obj.Context == null || obj.Context.IsReadonly) return;
     if (e.NewValue == true && e.OldValue == false)
     {
         obj.TransientState[SET_ISFILEREADONLY_KEY] = true;
     }
     else if (e.OldValue == true && e.NewValue == false && !obj.TransientState.ContainsKey(SET_ISFILEREADONLY_KEY))
     {
         throw new InvalidOperationException("Changing IsFileReadonly back to false is not allowed");
     }
 }
Exemple #10
0
 public static void preSet_Blob(File obj, PropertyPreSetterEventArgs<Zetbox.App.Base.Blob> e)
 {
     e.Result = obj.HandleBlobChange(e.OldValue, e.NewValue);
 }