Пример #1
0
            public object?GetNthMask(int index)
            {
                LoadScreenLocation_FieldIndex enu = (LoadScreenLocation_FieldIndex)index;

                switch (enu)
                {
                case LoadScreenLocation_FieldIndex.Direct:
                    return(Direct);

                case LoadScreenLocation_FieldIndex.Indirect:
                    return(Indirect);

                case LoadScreenLocation_FieldIndex.GridPoint:
                    return(GridPoint);

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Пример #2
0
            public void SetNthMask(int index, object obj)
            {
                LoadScreenLocation_FieldIndex enu = (LoadScreenLocation_FieldIndex)index;

                switch (enu)
                {
                case LoadScreenLocation_FieldIndex.Direct:
                    this.Direct = (Exception?)obj;
                    break;

                case LoadScreenLocation_FieldIndex.Indirect:
                    this.Indirect = (Exception?)obj;
                    break;

                case LoadScreenLocation_FieldIndex.GridPoint:
                    this.GridPoint = (Exception?)obj;
                    break;

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }