示例#1
0
        private ResponseLayoutVM CreateLayout(Response response, ResponseLayout layoutModel)
        {
            ResponseLayout   newLayoutModel = layoutModel;
            ResponseLayoutVM layout         = null;

            if (response.IsTypeChoices)
            {
                if (newLayoutModel as ChoicesLayout == null)
                {
                    newLayoutModel = new ChoicesLayout();
                }
                layout = new ChoicesLayoutVM((ChoicesLayout)newLayoutModel);
            }
            else if (response.IsTypeDateTime)
            {
                if (newLayoutModel as DateTimeLayout == null)
                {
                    newLayoutModel = new DateTimeLayout();
                }
                layout = new DateTimeLayoutVM((DateTimeLayout)newLayoutModel);
            }
            else if (response.IsTypeFree)
            {
                if (newLayoutModel as FreeLayout == null)
                {
                    newLayoutModel = new FreeLayout();
                }
                layout = new FreeLayoutVM((FreeLayout)newLayoutModel);
            }
            else if (response.IsTypeNumber)
            {
                if (newLayoutModel as NumericLayout == null)
                {
                    newLayoutModel = new NumericLayout();
                }
                layout = new NumericLayoutVM((NumericLayout)newLayoutModel);
            }
            else
            {
                if (newLayoutModel as UnknownLayout == null)
                {
                    newLayoutModel = new UnknownLayout();
                }
                layout = new UnknownLayoutVM((UnknownLayout)newLayoutModel);
            }
            layout.Parent = this;
            return(layout);
        }
示例#2
0
 private ResponseLayoutVM CreateLayout(Response response, ResponseLayout layoutModel)
 {
     ResponseLayout newLayoutModel = layoutModel;
     ResponseLayoutVM layout = null;
     if (response.IsTypeChoices)
     {
         if (newLayoutModel as ChoicesLayout == null)
         {
             newLayoutModel = new ChoicesLayout();
         }
         layout = new ChoicesLayoutVM((ChoicesLayout)newLayoutModel);
     }
     else if (response.IsTypeDateTime)
     {
         if (newLayoutModel as DateTimeLayout == null)
         {
             newLayoutModel = new DateTimeLayout();
         }
         layout = new DateTimeLayoutVM((DateTimeLayout)newLayoutModel);
     }
     else if (response.IsTypeFree)
     {
         if (newLayoutModel as FreeLayout == null)
         {
             newLayoutModel = new FreeLayout();
         }
         layout = new FreeLayoutVM((FreeLayout)newLayoutModel);
     }
     else if (response.IsTypeNumber)
     {
         if (newLayoutModel as NumericLayout  == null)
         {
             newLayoutModel = new NumericLayout();
         }
         layout = new NumericLayoutVM((NumericLayout)newLayoutModel);
     }
     else
     {
         if (newLayoutModel as UnknownLayout == null)
         {
             newLayoutModel = new UnknownLayout();
         }
         layout = new UnknownLayoutVM((UnknownLayout)newLayoutModel);
     }
     layout.Parent = this;
     return layout;
 }
示例#3
0
 public UnknownLayoutVM(UnknownLayout unknownLayout)
     : base(unknownLayout)
 {
 }
示例#4
0
 public UnknownLayoutVM(UnknownLayout unknownLayout)
     : base(unknownLayout)
 {
 }