Exemplo n.º 1
0
 void frmMod06DataPro_Load(object sender, EventArgs e)
 {
     _envList = new List <PrjEnvelopeItem>();
     if (File.Exists(_path))
     {
         InputArg arg = InputArg.ParseXml(_path);
         if (arg != null)
         {
             InitSetting(arg);
         }
     }
 }
Exemplo n.º 2
0
 public OriginData2Database(string inputDir, Dictionary <string, List <string> > originFiles2Base, bool isOverrideRecord, Action <string> calProBack)
 {
     InitializeComponent();
     _uniformOriginFiles = originFiles2Base;
     _inputDir           = inputDir;
     _isOverrideRecord   = isOverrideRecord;
     _dbConnect          = new ConnectMySqlCloud();
     _calProBack         = calProBack;
     if (File.Exists(_path))
     {
         InputArg arg = InputArg.ParseXml(_path);
         if (arg != null && arg.ValidEnvelopes != null && arg.ValidEnvelopes.Length > 0)
         {
             _chinaENV = arg.ValidEnvelopes[0].PrjEnvelope;
         }
     }
     if (_chinaENV == null)
     {
         _chinaENV = new RasterProject.PrjEnvelope(65, 145, 10, 60);
     }
 }
Exemplo n.º 3
0
 private void AddDefaultRegions()
 {
     if (File.Exists(_path))
     {
         InputArg arg = InputArg.ParseXml(_path);
         if (arg != null)
         {
             _xmlSelectedNode = arg.Bands;
             if (Directory.Exists(arg.InputDir))
             {
                 txtInDir.Text = arg.InputDir;
             }
             txtOutDir.Text = arg.OutputDir;
             if (arg.ValidEnvelopes != null && arg.ValidEnvelopes.Length > 0)
             {
                 _envList = arg.ValidEnvelopes.ToList();
                 foreach (PrjEnvelopeItem item in _envList)
                 {
                     cbxRegionlist.Items.Add(item.Name);
                 }
             }
         }
     }
     else
     {
         RasterProject.PrjEnvelope globalEnv    = new RasterProject.PrjEnvelope(-180, 180, -90, 90);
         PrjEnvelopeItem           globalPrjEnv = new PrjEnvelopeItem("Global", globalEnv);
         _envList.Add(globalPrjEnv);
         RasterProject.PrjEnvelope chinaEnv    = new RasterProject.PrjEnvelope(65, 145, 10, 60);
         PrjEnvelopeItem           chinaPrjEnv = new PrjEnvelopeItem("China", chinaEnv);
         _envList.Add(chinaPrjEnv);
         foreach (PrjEnvelopeItem env in _envList)
         {
             cbxRegionlist.Items.Add(env.Name);
         }
         cbxRegionlist.SelectedIndex = 1;
     }
 }