Example #1
0
        public static bool ReadMETEDownloadData(string jsonPath, out METEDownloadData cOperationArray)
        {
            cOperationArray = null;

            try
            {
                if (!System.IO.File.Exists(jsonPath))
                {
                    return(false);
                }

                bool status;

                string jsonText;
                status = ReadFileDataUTF8(jsonPath, out jsonText);
                if (!status)
                {
                    return(false);
                }

                cOperationArray = JsonConvert.DeserializeObject <METEDownloadData>(jsonText);
            }
            catch (System.Exception ex)
            {
                return(false);
            }

            return(true);
        }
Example #2
0
 /// <summary>
 /// 取得METEDownloadData.dat資料
 /// </summary>
 /// <param name="cMETEDownloadData"></param>
 /// <returns></returns>
 public static bool GetMETEDownloadData(out METEDownloadData cMETEDownloadData)
 {
     cMETEDownloadData = new METEDownloadData();
     try
     {
         string METEDownloadDat_dat = "METEDownloadData.dat";
         string METEDownloadDatPath = string.Format(@"{0}\{1}", CaxEnv.GetGlobaltekTaskDir(), METEDownloadDat_dat);
         CaxPublic.ReadMETEDownloadData(METEDownloadDatPath, out cMETEDownloadData);
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }