using Aspose.Cells;
using Newtonsoft.Json;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StartServerWPF.Models
{
    public class ApmsModel : BindableBase
    {
        private string station1;
        private List<TTime> ttime1;
        private string push2wx1;
        private string savepath1;
        private float xmin1;
        private float xmax1;
        private float ymin1;
        private float ymax1;
        private float zref1;
        private float zmin1;
        private float zmax1;
        private float minstep1;
        private List<StationChannelsModel> channels1;

        [JsonProperty("station")]
        public string station { get => station1; set => SetProperty(ref station1, value); }
        [JsonProperty("ttime")]
        public List<TTime> ttime { get => ttime1; set => SetProperty(ref ttime1, value); }
        [JsonProperty("Main.log_level")]
        public string  log_level { get; set; }
        [JsonProperty("Main.slice_seconds")]
        public int  slice_seconds { get; set; }
        [JsonProperty("Main.overlap_seconds")]
        public int  overlap_seconds { get; set; }
        [JsonProperty("Main.is_mag")]
        public string  is_mag { get; set; }
        [JsonProperty("Main.is_write_slice")]
        public string  is_write_slice { get; set; }
        [JsonProperty("Main.lon")]
        public double  lon { get; set; }
        [JsonProperty("Main.lat")]
        public double lat { get; set; }
        [JsonProperty("Main.height")]
        public double height { get; set; }
        [JsonProperty("Main.savepath")]
        public string savepath { get => savepath1; set => SetProperty(ref savepath1, value); }
        [JsonProperty("Main.push2wx")]
        public string push2wx { get => push2wx1; set => SetProperty(ref push2wx1, value); }
        [JsonProperty("Main.push_url")]
        public string  push_url { get; set; }
        [JsonProperty("Main.push_mag")]
        public double push_mag { get; set; }
        [JsonProperty("Main.message_id")]
        public int message_id { get; set; }
        [JsonProperty("Main.company_id")]
        public int company_id { get; set; }
        [JsonProperty("Main.area_id")]
        public int area_id { get; set; }
        [JsonProperty("Main.content")]
        public string  content { get; set; }
        [JsonProperty("Main.push_key")]
        public string  push_key { get; set; }
        [JsonProperty("RServer.host")]
        public string  host { get; set; }
        public List<StationChannelsModel> channels { get => channels1; set => SetProperty(ref channels1, value); }

        [JsonProperty("Locate.log_level")]
        public string llog_level { get; set; }
        [JsonProperty("Locate.work_path")]
        public string work_path { get; set; }
        [JsonProperty("Locate.xmin")]
        public float xmin { get => xmin1; set => SetProperty(ref xmin1, value); }
        [JsonProperty("Locate.xmax")]
        public float xmax { get => xmax1; set => SetProperty(ref xmax1, value); }
        [JsonProperty("Locate.ymin")]
        public float ymin { get => ymin1; set => SetProperty(ref ymin1, value); }
        [JsonProperty("Locate.ymax")]
        public float ymax { get => ymax1; set => SetProperty(ref ymax1, value); }
        [JsonProperty("Locate.zref")]
        public float zref { get => zref1; set => SetProperty(ref zref1, value); }
        [JsonProperty("Locate.zmin")]
        public float zmin { get => zmin1; set => SetProperty(ref zmin1, value); }
        [JsonProperty("Locate.zmax")]
        public float zmax { get => zmax1; set => SetProperty(ref zmax1, value); }
        [JsonProperty("Locate.minstep")]
        public float minstep { get => minstep1; set => SetProperty(ref minstep1, value); }
        [JsonProperty("Locate.method")]
        public string method { get; set; }
        [JsonProperty("Locate.clusted_otime")]
        public double clusted_otime { get; set; }

    }

    public class TTime : BindableBase
    {
        private string ttime2d1;

        [JsonProperty("station")]
        public string station { get; set; }

     //   [JsonProperty("ttime")]
      //  public string ttime { get; set; }

        [JsonProperty("ttime2d")]
        public string ttime2d { get => ttime2d1; 
            set => SetProperty(ref ttime2d1, value); 
        }
    }
    public class StationChannelsModel
    {
        public string network { get; set; }

        public string location { get; set; }

        public string channels { get; set; }

        public string station { get ; set;  }
    }
}
