Пример #1
0
 public ZilSegment([NotNull] ZilObject obj)
 {
     if (obj is ZilForm objForm)
     {
         form = objForm;
     }
     else
     {
         throw new ArgumentException("Segment must be based on a FORM");
     }
 }
Пример #2
0
        public static ZilSegment FromList([NotNull] Context ctx, [NotNull] ZilListBase list)
        {
            if (!(list is ZilForm form))
            {
                form = new ZilForm(list)
                {
                    SourceLine = SourceLines.Chtyped
                };
            }

            return(new ZilSegment(form));
        }