예제 #1
0
 /// <summary>
 /// ObservationPointを初期化します。
 /// </summary>
 /// <param name="type"></param>
 /// <param name="code"></param>
 /// <param name="isSuspended"></param>
 /// <param name="name"></param>
 /// <param name="region"></param>
 /// <param name="location"></param>
 /// <param name="point"></param>
 /// <param name="classId"></param>
 /// <param name="prefClassId"></param>
 public ObservationPoint(ObservationPointType type, string code, bool isSuspended, string name, string region, Location location, Point2?point = null, int?classId = null, int?prefClassId = null)
 {
     Type                       = type;
     Code                       = code;
     IsSuspended                = isSuspended;
     Name                       = name;
     Region                     = region;
     Location                   = location;
     Point                      = point;
     ClassificationId           = classId;
     PrefectureClassificationId = prefClassId;
 }
예제 #2
0
        /// <summary>
        /// 人が読みやすい文字に変換します。
        /// </summary>
        /// <param name="type">変換させるObservationPointType</param>
        /// <returns>変換された文字列</returns>
        public static string ToNaturalString(this ObservationPointType type)
        {
            switch (type)
            {
            case ObservationPointType.Unknown:
                return("不明");

            case ObservationPointType.KiK_net:
                return("KiK-net");

            case ObservationPointType.K_NET:
                return("K-NET");
            }
            return("エラー");
        }