예제 #1
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);
 }
예제 #2
0
 /// <summary>
 /// 取得METEDownload_Upload.dat資料
 /// </summary>
 /// <param name="cMETE_Download_Upload_Path"></param>
 /// <returns></returns>
 public static bool GetMETEDownload_Upload(out METE_Download_Upload_Path cMETE_Download_Upload_Path)
 {
     cMETE_Download_Upload_Path = new METE_Download_Upload_Path();
     try
     {
         string METEDownload_Upload_dat  = "METEDownload_Upload.dat";
         string METEDownload_Upload_Path = string.Format(@"{0}\{1}", CaxEnv.GetGlobaltekEnvDir(), METEDownload_Upload_dat);
         CaxPublic.ReadMETEDownloadUpload_Path(METEDownload_Upload_Path, out cMETE_Download_Upload_Path);
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
예제 #3
0
 /// <summary>
 /// 取得AssignGaugeData.dat資料  (路徑:IP:Globaltek\ME_Config\AssignGaugeData.dat)
 /// </summary>
 /// <param name="AGtxt"></param>
 /// <returns></returns>
 public static bool GetAssignGaugeData(out string[] AGData)
 {
     AGData = new string[] { };
     try
     {
         string AssignGaugeData_dat  = "AssignGaugeData.dat";
         string AssignGaugeData_Path = string.Format(@"{0}\{1}\{2}\{3}", CaxEnv.GetGlobaltekEnvDir(), "ME_Config", "Config", AssignGaugeData_dat);
         AGData = System.IO.File.ReadAllLines(AssignGaugeData_Path);
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
예제 #4
0
 public static bool GetDownUpLoadDat(out DownUpLoadDat sDownUpLoadDat)
 {
     sDownUpLoadDat = new DownUpLoadDat();
     try
     {
         string downUpLoadDatName        = "METEDownload_Upload_New.dat";
         string METEDownload_Upload_Path = string.Format(@"{0}\{1}", CaxEnv.GetGlobaltekEnvDir(), downUpLoadDatName);
         ReadDownUpLoadDat(METEDownload_Upload_Path, out sDownUpLoadDat);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("取得DownUpLoadDat失敗");
         return(false);
     }
     return(true);
 }
예제 #5
0
 /// <summary>
 /// 檢查METEDownloadData.dat是否存在
 /// </summary>
 /// <returns></returns>
 public static bool CheckMETEDownloadData()
 {
     try
     {
         string METEDownloadData_dat  = "METEDownloadData.dat";
         string METEDownloadData_Path = string.Format(@"{0}\{1}", CaxEnv.GetGlobaltekTaskDir(), METEDownloadData_dat);
         if (!System.IO.File.Exists(METEDownloadData_Path))
         {
             MessageBox.Show("METEDownloadData.dat不存在");
             return(false);
         }
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
예제 #6
0
 /// <summary>
 /// 檢查ControlerConfig.dat是否存在  (路徑:IP:Globaltek\TE_Config\ControlerConfig.dat)
 /// </summary>
 /// <returns></returns>
 public static bool CheckControlerConfigDat()
 {
     try
     {
         string ControlerConfig_dat  = "ControlerConfig.dat";
         string ControlerConfig_Path = string.Format(@"{0}\{1}\{2}{3}", CaxEnv.GetGlobaltekEnvDir(), "TE_Config", "Config", ControlerConfig_dat);
         if (!System.IO.File.Exists(ControlerConfig_Path))
         {
             MessageBox.Show("ControlerConfig.dat不存在");
             return(false);
         }
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
예제 #7
0
 /// <summary>
 /// 檢查template_post.dat是否存在
 /// </summary>
 /// <returns></returns>
 public static bool CheckTemplatePostDat()
 {
     try
     {
         string TemplatePost_dat      = "template_post.dat";
         string TemplatePostData_Path = string.Format(@"{0}\{1}", CaxEnv.GetGlobaltekPostProcessorDir(), TemplatePost_dat);
         if (!System.IO.File.Exists(TemplatePostData_Path))
         {
             MessageBox.Show("template_post.dat不存在");
             return(false);
         }
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
        /// <summary>
        /// 取得DraftingConfig.dat資料  (路徑:IP:Globaltek\ME_Config\DraftingConfig.dat)
        /// </summary>
        /// <param name="cControlerConfig"></param>
        /// <returns></returns>
        public static bool GetDraftingConfigData(out DraftingConfig cDraftingData)
        {
            cDraftingData = new DraftingConfig();
            try
            {
                string DraftingConfig_dat  = "DraftingConfig.dat";
                string DraftingConfig_Path = string.Format(@"{0}\{1}\{2}\{3}", CaxEnv.GetGlobaltekEnvDir(), "ME_Config", "Config", DraftingConfig_dat);
                if (!System.IO.File.Exists(DraftingConfig_Path))
                {
                    MessageBox.Show("路徑:" + DraftingConfig_Path + "不存在");
                    return(false);
                }

                ReadDraftingConfig(DraftingConfig_Path, out cDraftingData);
            }
            catch (System.Exception ex)
            {
                return(false);
            }
            return(true);
        }
예제 #9
0
        /// <summary>
        /// 取得ControlerConfig.dat資料  (路徑:IP:Globaltek\TE_Config\ControlerConfig.dat)
        /// </summary>
        /// <param name="cControlerConfig"></param>
        /// <returns></returns>
        public static bool GetControlerConfigData(out ControlerConfig cControlerConfig)
        {
            cControlerConfig = new ControlerConfig();
            try
            {
                string ControlerConfig_dat  = "ControlerConfig.dat";
                string ControlerConfig_Path = string.Format(@"{0}\{1}\{2}\{3}", CaxEnv.GetGlobaltekEnvDir(), "TE_Config", "Config", ControlerConfig_dat);
                if (!System.IO.File.Exists(ControlerConfig_Path))
                {
                    MessageBox.Show("路徑:" + ControlerConfig_Path + "不存在");
                    return(false);
                }

                CaxPublic.ReadControlerConfig(ControlerConfig_Path, out cControlerConfig);
            }
            catch (System.Exception ex)
            {
                return(false);
            }
            return(true);
        }