Example #1
0
        private void OnDeserialized(StreamingContext context)
        {
            if (PreviewType.ToString() == string.Empty)
                PreviewType = NutcrackerEffects.PreviewType.Tree180;

            if (Palette == null)
                Palette = new Palette();
            if (Fire_Height < 1)
                Fire_Height = 50;
            if (Meteor_Colors < 1)
                Meteor_Colors = 1;
            if (Meteor_Count < 1)
                Meteor_Count = 10;
            if (Meteor_TrailLength < 1)
                Meteor_TrailLength = 8;

            if (Spirals_PaletteRepeat == 0)
                Spirals_PaletteRepeat = 1;

            if (Twinkles_Count < 2)
                Twinkles_Count = 10;
            if (Twinkles_Steps < 2)
                Twinkles_Count = 30;

            if (Text_Line1 == null)
                Text_Line1 = string.Empty;
            if (Text_Line2 == null)
                Text_Line2 = string.Empty;
            if (Text_Line3 == null)
                Text_Line3 = string.Empty;
            if (Text_Line4 == null)
                Text_Line4 = string.Empty;

            if (Text_Font == null) {
                Text_Font = new SerializableFont(new Font("Arial", 8));
            }

            if (Picture_FileName == null)
                Picture_FileName = string.Empty;
            if (Picture_GifSpeed < 1)
                Picture_GifSpeed = 1;
            if (Picture_ScalePercent < 1)
            {
                Picture_ScalePercent = 10;
            }

            if (Spirograph_ROuter < 1)
                Spirograph_ROuter = 20;
            if (Spirograph_RInner < 1)
                Spirograph_RInner = 10;
            if (Spirograph_Distance < 1)
                Spirograph_Distance = 30;

            if (Tree_Branches == 0)
                Tree_Branches = 5;

            if (PixelSize == 0)
                PixelSize = 3;

            if (Movie_DataPath == null)
                Movie_DataPath = string.Empty;

            if (PictureTile_Scaling == 0.0) {
                PictureTile_Scaling = 100.0;
            }

            if (Curtain_SwagWidth < 1)
            {
                Curtain_SwagWidth = 3;
            }
        }
Example #2
0
 public NutcrackerData()
 {
     Text_Font = new SerializableFont(new Font("Arial", 8));
 }
Example #3
0
 public NutcrackerData()
 {
     Text_Font = new SerializableFont(new Font("Arial", 8));
 }
Example #4
0
        private void OnDeserialized(StreamingContext context)
        {
            if (PreviewType.ToString() == string.Empty)
            {
                PreviewType = NutcrackerEffects.PreviewType.Tree180;
            }

            if (Palette == null)
            {
                Palette = new Palette();
            }
            if (Fire_Height < 1)
            {
                Fire_Height = 50;
            }
            if (Meteor_Colors < 1)
            {
                Meteor_Colors = 1;
            }
            if (Meteor_Count < 1)
            {
                Meteor_Count = 10;
            }
            if (Meteor_TrailLength < 1)
            {
                Meteor_TrailLength = 8;
            }

            if (Spirals_PaletteRepeat == 0)
            {
                Spirals_PaletteRepeat = 1;
            }

            if (Twinkles_Count < 2)
            {
                Twinkles_Count = 10;
            }
            if (Twinkles_Steps < 2)
            {
                Twinkles_Count = 30;
            }

            if (Text_Line1 == null)
            {
                Text_Line1 = string.Empty;
            }
            if (Text_Line2 == null)
            {
                Text_Line2 = string.Empty;
            }
            if (Text_Line3 == null)
            {
                Text_Line3 = string.Empty;
            }
            if (Text_Line4 == null)
            {
                Text_Line4 = string.Empty;
            }

            if (Text_Font == null)
            {
                Text_Font = new SerializableFont(new Font("Arial", 8));
            }

            if (Picture_FileName == null)
            {
                Picture_FileName = string.Empty;
            }
            if (Picture_GifSpeed < 1)
            {
                Picture_GifSpeed = 1;
            }
            if (Picture_ScalePercent < 1)
            {
                Picture_ScalePercent = 10;
            }

            if (Spirograph_ROuter < 1)
            {
                Spirograph_ROuter = 20;
            }
            if (Spirograph_RInner < 1)
            {
                Spirograph_RInner = 10;
            }
            if (Spirograph_Distance < 1)
            {
                Spirograph_Distance = 30;
            }

            if (Tree_Branches == 0)
            {
                Tree_Branches = 5;
            }

            if (PixelSize == 0)
            {
                PixelSize = 3;
            }

            if (Movie_DataPath == null)
            {
                Movie_DataPath = string.Empty;
            }

            if (PictureTile_Scaling == 0.0)
            {
                PictureTile_Scaling = 100.0;
            }

            if (Curtain_SwagWidth < 1)
            {
                Curtain_SwagWidth = 3;
            }
        }