Ejemplo n.º 1
0
        public FieldRow(FieldRow parent, RowTypes type)
        {
            RowType = type;

            if (parent == null)
                return;

            ParentField = parent;
            Instances = parent.Instances;
        }
Ejemplo n.º 2
0
        public FieldModel(InstanceModel instance, FieldModel parent, RowTypes type)
        {
            Instance = instance;
            RowType = type;

            Nodes = new List<IFieldModel>();
            Cells = new List<string>();

            ID = Instance.RndGen.Next();
            Instance.FieldMap[ID] = this;

            if (parent == null)
                return;

            ParentField = parent;
            Instances = parent.Instances;
        }
Ejemplo n.º 3
0
        public FieldModel(InstanceModel instance, FieldModel parent, RowTypes type)
        {
            Instance = instance;
            RowType  = type;

            Nodes = new List <IFieldModel>();
            Cells = new List <string>();

            ID = Instance.RndGen.Next();
            Instance.FieldMap[ID] = this;

            if (parent == null)
            {
                return;
            }

            ParentField = parent;
            Instances   = parent.Instances;
        }
Ejemplo n.º 4
0
        public Job(int rowNumber, string rowString)
        {
            RowTypes rowType = GetRowType(rowString);

            switch (rowType)
            {
            case RowTypes.Header:
                row = new HeaderJob(rowNumber, rowString);
                break;

            case RowTypes.Comment:
                row = new CommentJob(rowNumber, rowString);
                break;

            case RowTypes.Spot:
                row = new SpotJob(rowNumber, rowString);
                break;

            case RowTypes.Move:
                row = new MoveJob(rowNumber, rowString);
                break;

            case RowTypes.Wait:
                row = new WaitJob(rowNumber, rowString);
                break;

            case RowTypes.Do:
                row = new DoJob(rowNumber, rowString);
                break;

            case RowTypes.Call:
                row = new CallJob(rowNumber, rowString);
                break;

            case RowTypes.End:
                row = new EndJob(rowNumber, rowString);
                break;

            case RowTypes.Etc:
                row = new EtcJob(rowNumber, rowString);
                break;
            }
        }
Ejemplo n.º 5
0
        private RowTypes GetRowType(string rowString)
        {
            RowTypes rowType = RowTypes.Etc;

            string[] s = rowString.Trim().Split(new char[] { ' ' });
            if (s.Length > 0)
            {
                if (s[0] == "Program")
                {
                    rowType = RowTypes.Header;
                }
                else if (s[0].StartsWith("'"))
                {
                    rowType = RowTypes.Comment;
                }
                else if (s[0].StartsWith("SPOT"))
                {
                    rowType = RowTypes.Spot;
                }
                else if (s[0].StartsWith("S"))
                {
                    rowType = RowTypes.Move;
                }
                else if (s[0].StartsWith("WAIT"))
                {
                    rowType = RowTypes.Wait;
                }
                else if (s[0].StartsWith("DO"))
                {
                    rowType = RowTypes.Do;
                }
                else if (s[0].StartsWith("END"))
                {
                    rowType = RowTypes.End;
                }
            }
            return(rowType);
        }
Ejemplo n.º 6
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, Type type)
     : this(grid, parent, rowType)
 {
     FieldType = type;
 }
Ejemplo n.º 7
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, PropertyInfo info)
     : this(grid, parent, rowType, info.PropertyType)
 {
     PropertyInfo = info;
 }
Ejemplo n.º 8
0
 public CoordsMap(RowTypes rowType, Rectangle rectangle, string title)
     : this(rowType, rectangle, 0)
 {
     this.title = title;
 }
Ejemplo n.º 9
0
 public FieldRow(FieldRow parent, RowTypes rowType, Type type)
     : this(parent, rowType)
 {
     FieldType = type;
 }
Ejemplo n.º 10
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, Type type, int elementIndex)
     : this(grid, parent, rowType, type)
 {
     ElementIndex = elementIndex;
 }
Ejemplo n.º 11
0
 public RowJob(RowTypes rowType, int rowNumber, string rowString)
 {
     RowType    = rowType;
     mRowNumber = rowNumber;
     mRowString = rowString;
 }
Ejemplo n.º 12
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, PropertyInfo info)
     : this(grid, parent, rowType, info.PropertyType)
 {
     PropertyInfo = info;
 }
Ejemplo n.º 13
0
			public RowJob(RowTypes rowType, int rowNumber, string rowString)
			{
				RowType = rowType;
				mRowNumber = rowNumber;
				mRowString = rowString;
			}
Ejemplo n.º 14
0
 public FieldRow(FieldRow parent, RowTypes rowType, FieldInfo info)
     : this(parent, rowType, info.FieldType)
 {
     TypeInfo = info;
 }
Ejemplo n.º 15
0
 public FieldRow(FieldRow parent, RowTypes rowType, Type type, int elementIndex)
     : this(parent, rowType, type)
 {
     ElementIndex = elementIndex;
 }
Ejemplo n.º 16
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, Type type, int elementIndex)
     : this(grid, parent, rowType, type)
 {
     ElementIndex = elementIndex;
 }
Ejemplo n.º 17
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, FieldInfo info)
     : this(grid, parent, rowType, info.FieldType)
 {
     TypeInfo = info;
 }
Ejemplo n.º 18
0
 public CoordsMap(RowTypes rowType, Rectangle rectangle, int value)
 {
     this.rowType   = rowType;
     this.rectangle = rectangle;
     this._value    = value;
 }
Ejemplo n.º 19
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, FieldInfo info)
     : this(grid, parent, rowType, info.FieldType)
 {
     TypeInfo = info;
 }
Ejemplo n.º 20
0
 public CoordsMap(RowTypes rowType, Rectangle rectangle, int value, int reference)
     : this(rowType, rectangle, value)
 {
     this.reference = reference;
 }
Ejemplo n.º 21
0
 public FieldModel(InstanceModel grid, FieldModel parent, RowTypes rowType, Type type)
     : this(grid, parent, rowType)
 {
     FieldType = type;
 }
Ejemplo n.º 22
0
 public CoordsMap(RowTypes rowType, Rectangle rectangle, int value, int reference, string title)
     : this(rowType, rectangle, value, reference)
 {
     this.title = title;
 }