/// <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); }
/// <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); }
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); }
/// <summary> /// 檢查METEDownload_Upload.dat是否存在 /// </summary> /// <returns></returns> public static bool CheckMETEDownload_Upload() { try { string METEDownload_Upload_dat = "METEDownload_Upload_New.dat"; string METEDownload_Upload_Path = string.Format(@"{0}\{1}", CaxEnv.GetGlobaltekEnvDir(), METEDownload_Upload_dat); if (!System.IO.File.Exists(METEDownload_Upload_Path)) { MessageBox.Show("METEDownload_Upload_New.dat不存在"); return(false); } } catch (System.Exception ex) { return(false); } return(true); }
/// <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); }
/// <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); }
/// <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); }