예제 #1
0
            public void SetNthMask(int index, object obj)
            {
                WeatherColors_FieldIndex enu = (WeatherColors_FieldIndex)index;

                switch (enu)
                {
                case WeatherColors_FieldIndex.Sunrise:
                    this.Sunrise = (Exception?)obj;
                    break;

                case WeatherColors_FieldIndex.Day:
                    this.Day = (Exception?)obj;
                    break;

                case WeatherColors_FieldIndex.Sunset:
                    this.Sunset = (Exception?)obj;
                    break;

                case WeatherColors_FieldIndex.Night:
                    this.Night = (Exception?)obj;
                    break;

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
예제 #2
0
            public object?GetNthMask(int index)
            {
                WeatherColors_FieldIndex enu = (WeatherColors_FieldIndex)index;

                switch (enu)
                {
                case WeatherColors_FieldIndex.Sunrise:
                    return(Sunrise);

                case WeatherColors_FieldIndex.Day:
                    return(Day);

                case WeatherColors_FieldIndex.Sunset:
                    return(Sunset);

                case WeatherColors_FieldIndex.Night:
                    return(Night);

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