using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Networking; using UnityEngine.EventSystems; using System.Text.RegularExpressions; using System.Data.SqlClient; using System.Runtime.InteropServices; using System.Text; using TMPro; using System; using System.IO; using ZXing; using ZXing.QrCode; using System.Net; using System.Data; using SimpleJSON; using System.Linq; public class test : MonoBehaviour { public GameObject textPrefab; public Transform textParent; public GameObject textceneter; public GameObject textPrefab1; public Transform textParent1; public GameObject textceneter1; public GameObject textPrefab2; public Transform textParent2; public GameObject textceneter2; public CanvasScaler canvasScaler; [SerializeField] GameObject 左; [SerializeField] GameObject 右; [SerializeField] GameObject 選擇面板; [SerializeField] TextMeshProUGUI 選擇語言; [SerializeField] TextMeshProUGUI 中; [SerializeField] TextMeshProUGUI 英; [SerializeField] TextMeshProUGUI 印; [SerializeField] TextMeshProUGUI 簡; [SerializeField] Button 中按鈕; [SerializeField] Button 英按鈕; [SerializeField] Button 印按鈕; [SerializeField] Button 簡按鈕; [SerializeField] TextMeshProUGUI 合約報價單審核; [SerializeField] TextMeshProUGUI 合約清單_tb; [SerializeField] TextMeshProUGUI 合約編號; [SerializeField] TextMeshProUGUI 客戶名稱; [SerializeField] TextMeshProUGUI 負責人; [SerializeField] TextMeshProUGUI 工程地點; [SerializeField] TextMeshProUGUI 地址; [SerializeField] TextMeshProUGUI 工程名稱_tb; [SerializeField] TextMeshProUGUI 公司名稱; [SerializeField] TextMeshProUGUI 負責人1; [SerializeField] TextMeshProUGUI 地址1; [SerializeField] TextMeshProUGUI 地址_地址1; [SerializeField] TextMeshProUGUI 負責人_名稱1; [SerializeField] TextMeshProUGUI 公司名稱_名稱; [SerializeField] TextMeshProUGUI 工程名稱_名稱; [SerializeField] TextMeshProUGUI 地址_地址; [SerializeField] TextMeshProUGUI 工程地點_地址; [SerializeField] TextMeshProUGUI 負責人_名稱; [SerializeField] TextMeshProUGUI 客戶名稱_名稱; [SerializeField] TextMeshProUGUI 合約編號號碼; [SerializeField] TextMeshProUGUI text1; [SerializeField] TextMeshProUGUI text2; [SerializeField] TextMeshProUGUI text3; [SerializeField] TextMeshProUGUI text4; [SerializeField] TextMeshProUGUI text5; [SerializeField] TextMeshProUGUI text6; [SerializeField] TextMeshProUGUI text7; [SerializeField] TextMeshProUGUI text8; [SerializeField] TextMeshProUGUI text11; [SerializeField] TextMeshProUGUI text21; [SerializeField] TextMeshProUGUI text31; [SerializeField] TextMeshProUGUI text41; [SerializeField] TextMeshProUGUI text51; [SerializeField] TextMeshProUGUI text61; [SerializeField] TextMeshProUGUI text71; [SerializeField] TextMeshProUGUI text81; [SerializeField] TextMeshProUGUI 未折價前; [SerializeField] TextMeshProUGUI 報價小計; [SerializeField] TextMeshProUGUI 預估工資總成本; [SerializeField] TextMeshProUGUI 預估材料總成本; [SerializeField] TextMeshProUGUI 總成本; [SerializeField] TextMeshProUGUI 預估工資總報價; [SerializeField] TextMeshProUGUI 預估材料總報價; [SerializeField] TextMeshProUGUI 總報價; [SerializeField] TextMeshProUGUI 利潤比; [SerializeField] TextMeshProUGUI 利潤比1; [SerializeField] TextMeshProUGUI 利潤比2; [SerializeField] TextMeshProUGUI 利潤比3; [SerializeField] TextMeshProUGUI 預估利潤; [SerializeField] TextMeshProUGUI 未折價前_錢; [SerializeField] TextMeshProUGUI 報價小計_錢; [SerializeField] TextMeshProUGUI 預估工資總成本_錢; [SerializeField] TextMeshProUGUI 預估材料總成本_錢; [SerializeField] TextMeshProUGUI 總成本_錢; [SerializeField] TextMeshProUGUI 預估工資總報價_錢; [SerializeField] TextMeshProUGUI 預估材料總報價_錢; [SerializeField] TextMeshProUGUI 總報價_錢; [SerializeField] TextMeshProUGUI 利潤比_錢; [SerializeField] TextMeshProUGUI 利潤比1_錢; [SerializeField] TextMeshProUGUI 利潤比2_錢; [SerializeField] TextMeshProUGUI 利潤比3_錢; [SerializeField] TextMeshProUGUI 預估利潤_錢; [SerializeField] TextMeshProUGUI 折讓金額; [SerializeField] TextMeshProUGUI 總成本1; [SerializeField] TextMeshProUGUI 總報價1; [SerializeField] TextMeshProUGUI 放行結果; [SerializeField] GameObject 放行面板; [SerializeField] GameObject 放行頁面關閉; [SerializeField] GameObject 放行頁面回到主畫面; [SerializeField] GameObject 總價按鈕; [SerializeField] GameObject 利潤表按鈕; [SerializeField] GameObject 報價; [SerializeField] GameObject image_row; [SerializeField] GameObject 面板_建立; [SerializeField] GameObject 面板_明細; [SerializeField] GameObject 下一頁; [SerializeField] GameObject 上一頁; [SerializeField] GameObject 面板_利潤; [SerializeField] GameObject 面板_利潤表頭; public float idleTime = 300f; // 5分鐘的閒置時間 private float timeSinceLastInteraction = 0f; bool isTraditionalChinese; private TextMeshProUGUI[] texts; private TextMeshProUGUI[] texts1; private TextMeshProUGUI[] texts2; private TextMeshProUGUI[] texts3; private TextMeshProUGUI[] texts4; private Image[] image; private List textcopy = new List(); private List textcopy1 = new List(); private List textcopy2 = new List(); private Button[] bts; List> myArray = new List>(); List 合約清單 = new List(); private float timer = 0f; private float interval = 60f; [SerializeField] GameObject 讀取面板; [SerializeField] TextMeshProUGUI 讀取; private string loadingText = ""; private int dotCount = 0; int nd = 1; private JSONNode jsond; void Start() { Screen.autorotateToPortrait = false; Screen.orientation = ScreenOrientation.LandscapeLeft; texts = new TextMeshProUGUI[] { text1, text2, text3, text4, text5, text6, text7, text8 }; texts2 = new TextMeshProUGUI[] { text11, text21, text31, text41, text51, text61, text71, text81 }; float screenWidth = Screen.width; float screenHeight = Screen.height; float rate = screenWidth/screenHeight; if (canvasScaler == null) { canvasScaler = GetComponent(); } if (rate>1.6) { canvasScaler.matchWidthOrHeight = 1f; } else { canvasScaler.matchWidthOrHeight = 0f; } StartCoroutine(判斷更新()); StartCoroutine(AnimateText()); Main.Global.阿帕契路徑="http://106.1.48.106:8080/wp-content/themes/event-star/tab.php?"; //Main.Global.阿帕契路徑="http://103.231.201.230/hxpgsweb/wp-content/themes/twentytwentyone/tab.php?"; 初始化系統語言(); Main.Global.預設伺服器路徑="tw"; Main.Global.系統語言="繁體中文"; 語言選擇按鈕(); 系統語言轉換(); StartCoroutine(審核清單()); } public void 左按鈕() { nd--; if (nd==1) { 左.SetActive(false); } else { 左.SetActive(true); } if (nd==合約清單.Count) { 右.SetActive(false); } else { 右.SetActive(true); } 讀取面板.SetActive(true); Main.Global.合約編號=合約清單[nd-1]; StartCoroutine(合約內容()); } public void 右按鈕() { nd++; if (nd==合約清單.Count) { 右.SetActive(false); } else { 右.SetActive(true); } if (nd==1) { 左.SetActive(false); } else { 左.SetActive(true); } 讀取面板.SetActive(true); Main.Global.合約編號=合約清單[nd-1]; StartCoroutine(合約內容()); } IEnumerator AnimateText() { string qqq = 讀取.text.ToString(); while (true) { yield return new WaitForSeconds(0.5f); if (dotCount < 3) { loadingText += "."; dotCount++; } else { loadingText = ""; dotCount = 0; } 讀取.text = qqq+loadingText; } } void Update() { timer += Time.deltaTime; // 判斷是否達到時間間隔 if (timer >= interval) { StartCoroutine(判斷更新()); timer = 0f; } if (Main.Global.快速登入==false) { if (Input.anyKeyDown) { timeSinceLastInteraction = 0f; } else { timeSinceLastInteraction += Time.deltaTime; if (timeSinceLastInteraction > idleTime) { change_Secen(1); } } } } IEnumerator 合約內容() { if (textcopy != null) { DeletetextCopies(); } 讀取面板.SetActive(true); string strcon = "合約內容"; string name1 = Main.Global.合約編號; string se = Main.Global.預設伺服器路徑; string strUrl = string.Format(Main.Global.阿帕契路徑+"comm={0}&字={1}&se={2}", strcon, name1, se); UnityWebRequest request = UnityWebRequest.Get(strUrl); yield return request.SendWebRequest(); if (request.result == UnityWebRequest.Result.ConnectionError) { //Debug.Log(request.error); yield break; } JSONNode json1 = JSON.Parse(request.downloadHandler.text); 合約編號號碼.text=json1[0]; 客戶名稱_名稱.text=json1[1]; 負責人_名稱.text=json1[2]; 工程地點_地址.text=json1[3]; 地址_地址.text=json1[4]; if (Main.Global.系統語言=="繁體中文" || Main.Global.系統語言=="簡體中文") { 工程名稱_名稱.text=json1[5]; } else { 工程名稱_名稱.text=json1[6]; } 公司名稱_名稱.text=json1[7]; 負責人_名稱1.text=json1[8]; 地址_地址1.text=json1[9]; if (textcopy != null) { StartCoroutine(合約報價系數()); } } IEnumerator 合約報價系數() { string strcon3 = "合約報價係數"; string se = Main.Global.預設伺服器路徑; string num = Main.Global.合約編號; string strUrl3 = string.Format(Main.Global.阿帕契路徑+"comm={0}&se={1}&編號={2}", strcon3, se, num); UnityWebRequest request3 = UnityWebRequest.Get(strUrl3); yield return request3.SendWebRequest(); if (request3.result == UnityWebRequest.Result.ConnectionError) { //Debug.Log(request.error); yield break; } JSONNode json3 = JSON.Parse(request3.downloadHandler.text); if (myArray != null) { myArray.Clear(); } if (json3.Count != 0) { for (int i3 = 0; i3 subList = new List(); for (int j3 = 2; j3().anchoredPosition = new Vector2(0, -sum1); textname1.transform.SetParent(textParent1, false); texts3 = textname1.GetComponentsInChildren(); GameObject textname2 = Instantiate(textPrefab2) as GameObject; textname2.GetComponent().anchoredPosition = new Vector2(0, -sum1); textname2.transform.SetParent(textParent2, false); texts4 = textname2.GetComponentsInChildren(); for (int j = 0; j ().anchoredPosition = new Vector2(0, -sum); textname.transform.SetParent(textParent, false); //textname.GetComponent().sizeDelta = new Vector2(textname.GetComponent().sizeDelta.x, 75f); texts1 = textname.GetComponentsInChildren(); //image = textname.GetComponentsInChildren(); /*foreach (var ima in image) { ima.GetComponent().sizeDelta = new Vector2(ima.GetComponent().sizeDelta.x, 73f); } foreach (var text in texts1) { text.GetComponent().sizeDelta = new Vector2(text.GetComponent().sizeDelta.x, 73f); }*/ for (int j = 0; j 3) { int index = item.IndexOf(" "); string chinese = item.Substring(0, index); string English = item.Substring(index + 1); if (Main.Global.系統語言=="繁體中文") { texts1[j].text=chinese; } else { texts1[j].text=English; } } else { texts1[j].text = json[i][j+1]; } }*/ else { texts1[j].text = json[i][j+1]; } } textcopy.Add(textname); sum+=75; } long doci = (long)Math.Round(doc); long doci1 = (long)Math.Round(doc1); long doci2 = (long)Math.Round(doc2); long doci3 = (long)Math.Round(doc3); double rate = 1-(doc/doc2); rate= rate*100; double rate1 = 1-(doc1/doc3); rate1= rate1*100; double rate2 = 1-((doc+doc1)/(doc2+doc3)); rate2= rate2*100; double rate3 = 1-((doc+doc1)/(doc2+doc3+dis)); rate3= rate3*100; if (double.IsNaN(rate)) { rate=0; } if (double.IsNaN(rate1)) { rate1=0; } if (double.IsNaN(rate2)) { rate2=0; } if (double.IsNaN(rate3)) { rate3=0; } 利潤比_錢.text=((int)Math.Round(rate)).ToString()+"%"; 利潤比1_錢.text=((int)Math.Round(rate1)).ToString()+"%"; 利潤比2_錢.text=((int)Math.Round(rate2)).ToString()+"%"; 利潤比3_錢.text=((int)Math.Round(rate3)).ToString()+"%"; 未折價前_錢.text=total.ToString("#,##0"); 報價小計_錢.text=total1.ToString("#,##0"); 預估工資總成本_錢.text=doci.ToString("#,##0"); 預估材料總成本_錢.text=doci1.ToString("#,##0"); 總成本_錢.text=(doci+doci1).ToString("#,##0"); 預估工資總報價_錢.text=doci2.ToString("#,##0"); 預估材料總報價_錢.text=doci3.ToString("#,##0"); 總報價_錢.text=(doci2+doci3).ToString("#,##0"); 預估利潤_錢.text=((doci2+doci3)-((doci+doci1)-dis)).ToString("#,##0"); textceneter.GetComponent().sizeDelta = new Vector2(1420, sum); textceneter1.GetComponent().sizeDelta = new Vector2(1420, sum1); textceneter2.GetComponent().sizeDelta = new Vector2(976, sum1); 讀取面板.SetActive(false); } IEnumerator 判斷更新() { string strcon = "更新"; string strUrl = string.Format(Main.Global.阿帕契路徑+"comm={0}", strcon); UnityWebRequest request = UnityWebRequest.Get(strUrl); yield return request.SendWebRequest(); if (request.result == UnityWebRequest.Result.ConnectionError) { yield break; } string str = request.downloadHandler.text.ToString(); Debug.Log(str); if (str == "系統更新") { change_Secen(1); } } IEnumerator 審核清單() { 讀取面板.SetActive(true); string strcon1 = "審核清單"; string se = Main.Global.預設伺服器路徑; //string se = "id"; string strUrl1 = string.Format(Main.Global.阿帕契路徑+"comm={0}&se={1}", strcon1, se); UnityWebRequest request1 = UnityWebRequest.Get(strUrl1); yield return request1.SendWebRequest(); if (request1.result == UnityWebRequest.Result.ConnectionError) { //Debug.Log(request.error); yield break; } JSONNode json = JSON.Parse(request1.downloadHandler.text); JSONArray titleData = json["fieldNames"].AsArray; JSONArray rowData = json["rows"].AsArray; int titleCount = titleData.Count; int rowCount = rowData.Count; if (rowCount > 0) { 放行頁面關閉.SetActive(true); 放行頁面回到主畫面.SetActive(false); 合約清單.Clear(); for (int i = 0; i(); if (i==3) { rectTransform.anchoredPosition = new Vector2(1200, 1200); } else { rectTransform.anchoredPosition = new Vector2(300*i, 0); } } } public void setting_exit() { 選擇面板.SetActive(false); } public void exit_click() { change_Secen(3); } public void DeletetextCopies() { // 刪除複製出來的物件 foreach (GameObject copy in textcopy) { Destroy(copy); } foreach (GameObject copy in textcopy1) { Destroy(copy); } foreach (GameObject copy in textcopy2) { Destroy(copy); } textcopy.Clear(); textcopy1.Clear(); textcopy2.Clear();// 清空列表 } public void 縮放_click() { image_row.SetActive(!image_row.activeSelf); 報價.SetActive(false); } public void 總價_click() { 報價.SetActive(!報價.activeSelf); image_row.SetActive(false); } public void change_Secen(int _screenNum) { SceneManager.LoadScene(_screenNum); } private void 系統語言轉換() { string 介面 = "H04"; if (Main.Global.系統語言=="繁體中文") { 合約報價單審核.text = Main.Global.系統語言字典[介面+"00CH"]; //建立合約資料.text = Main.Global.系統語言字典[介面+"01CH"]; //工程合約報價明細.text = Main.Global.系統語言字典[介面+"02CH"]; // 合約清單_tb.text = Main.Global.系統語言字典[介面+"03CH"]; 合約編號.text = Main.Global.系統語言字典[介面+"04CH"]; 客戶名稱.text = Main.Global.系統語言字典[介面+"05CH"]; 負責人.text = Main.Global.系統語言字典[介面+"06CH"]; 負責人1.text = Main.Global.系統語言字典[介面+"06CH"]; 工程地點.text = Main.Global.系統語言字典[介面+"07CH"]; 地址.text = Main.Global.系統語言字典[介面+"08CH"]; 地址1.text = Main.Global.系統語言字典[介面+"08CH"]; 工程名稱_tb.text = Main.Global.系統語言字典[介面+"09CH"]; 公司名稱.text = Main.Global.系統語言字典[介面+"10CH"]; 中.text = Main.Global.系統語言字典[介面+"11CH"]; 英.text = Main.Global.系統語言字典[介面+"12CH"]; 印.text = Main.Global.系統語言字典[介面+"13CH"]; 簡.text = Main.Global.系統語言字典[介面+"29CH"]; 選擇語言.text = Main.Global.系統語言字典[介面+"14CH"]; 未折價前.text = Main.Global.系統語言字典[介面+"15CH"]; 報價小計.text = Main.Global.系統語言字典[介面+"16CH"]; 預估工資總成本.text = Main.Global.系統語言字典[介面+"17CH"]; 預估材料總成本.text = Main.Global.系統語言字典[介面+"18CH"]; 總成本.text = Main.Global.系統語言字典[介面+"19CH"]; 總成本1.text = Main.Global.系統語言字典[介面+"19CH"]; 預估工資總報價.text = Main.Global.系統語言字典[介面+"20CH"]; 預估材料總報價.text = Main.Global.系統語言字典[介面+"21CH"]; 總報價.text = Main.Global.系統語言字典[介面+"22CH"]; 總報價1.text = Main.Global.系統語言字典[介面+"22CH"]; 利潤比.text = Main.Global.系統語言字典[介面+"23CH"]; 利潤比1.text = Main.Global.系統語言字典[介面+"23CH"]; 利潤比2.text = Main.Global.系統語言字典[介面+"24CH"]; 利潤比3.text = Main.Global.系統語言字典[介面+"25CH"]; 預估利潤.text = Main.Global.系統語言字典[介面+"26CH"]; 折讓金額.text = Main.Global.系統語言字典[介面+"27CH"]; } else if (Main.Global.系統語言=="簡體中文") { 合約報價單審核.text = Main.Global.系統語言字典[介面+"00CS"]; //建立合約資料.text = Main.Global.系統語言字典[介面+"01CH"]; //工程合約報價明細.text = Main.Global.系統語言字典[介面+"02CH"]; // 合約清單_tb.text = Main.Global.系統語言字典[介面+"03CH"]; 合約編號.text = Main.Global.系統語言字典[介面+"04CS"]; 客戶名稱.text = Main.Global.系統語言字典[介面+"05CS"]; 負責人.text = Main.Global.系統語言字典[介面+"06CS"]; 負責人1.text = Main.Global.系統語言字典[介面+"06CS"]; 工程地點.text = Main.Global.系統語言字典[介面+"07CS"]; 地址.text = Main.Global.系統語言字典[介面+"08CS"]; 地址1.text = Main.Global.系統語言字典[介面+"08CS"]; 工程名稱_tb.text = Main.Global.系統語言字典[介面+"09CS"]; 公司名稱.text = Main.Global.系統語言字典[介面+"10CS"]; 中.text = Main.Global.系統語言字典[介面+"11CS"]; 英.text = Main.Global.系統語言字典[介面+"12CS"]; 印.text = Main.Global.系統語言字典[介面+"13CS"]; 簡.text = Main.Global.系統語言字典[介面+"29CS"]; 選擇語言.text = Main.Global.系統語言字典[介面+"14CS"]; 未折價前.text = Main.Global.系統語言字典[介面+"15CS"]; 報價小計.text = Main.Global.系統語言字典[介面+"16CS"]; 預估工資總成本.text = Main.Global.系統語言字典[介面+"17CS"]; 預估材料總成本.text = Main.Global.系統語言字典[介面+"18CS"]; 總成本.text = Main.Global.系統語言字典[介面+"19CS"]; 總成本1.text = Main.Global.系統語言字典[介面+"19CS"]; 預估工資總報價.text = Main.Global.系統語言字典[介面+"20CS"]; 預估材料總報價.text = Main.Global.系統語言字典[介面+"21CS"]; 總報價.text = Main.Global.系統語言字典[介面+"22CS"]; 總報價1.text = Main.Global.系統語言字典[介面+"22CS"]; 利潤比.text = Main.Global.系統語言字典[介面+"23CS"]; 利潤比1.text = Main.Global.系統語言字典[介面+"23CS"]; 利潤比2.text = Main.Global.系統語言字典[介面+"24CS"]; 利潤比3.text = Main.Global.系統語言字典[介面+"25CS"]; 預估利潤.text = Main.Global.系統語言字典[介面+"26CS"]; 折讓金額.text = Main.Global.系統語言字典[介面+"27CS"]; } else if (Main.Global.系統語言=="English") { 合約報價單審核.text = Main.Global.系統語言字典[介面+"00EN"]; //建立合約資料.text = Main.Global.系統語言字典[介面+"01EN"]; //工程合約報價明細.text = Main.Global.系統語言字典[介面+"02EN"]; //合約清單_tb.text = Main.Global.系統語言字典[介面+"03EN"]; 合約編號.text = Main.Global.系統語言字典[介面+"04EN"]; 客戶名稱.text = Main.Global.系統語言字典[介面+"05EN"]; 負責人.text = Main.Global.系統語言字典[介面+"06EN"]; 負責人1.text = Main.Global.系統語言字典[介面+"06EN"]; 工程地點.text = Main.Global.系統語言字典[介面+"07EN"]; 地址.text = Main.Global.系統語言字典[介面+"08EN"]; 地址1.text = Main.Global.系統語言字典[介面+"08EN"]; 工程名稱_tb.text = Main.Global.系統語言字典[介面+"09EN"]; 公司名稱.text = Main.Global.系統語言字典[介面+"10EN"]; 中.text = Main.Global.系統語言字典[介面+"11EN"]; 英.text = Main.Global.系統語言字典[介面+"12EN"]; 印.text = Main.Global.系統語言字典[介面+"13EN"]; 簡.text = Main.Global.系統語言字典[介面+"29EN"]; 選擇語言.text = Main.Global.系統語言字典[介面+"14EN"]; 未折價前.text = Main.Global.系統語言字典[介面+"15EN"]; 報價小計.text = Main.Global.系統語言字典[介面+"16EN"]; 預估工資總成本.text = Main.Global.系統語言字典[介面+"17EN"]; 預估材料總成本.text = Main.Global.系統語言字典[介面+"18EN"]; 總成本.text = Main.Global.系統語言字典[介面+"19EN"]; 總成本1.text = Main.Global.系統語言字典[介面+"19EN"]; 預估工資總報價.text = Main.Global.系統語言字典[介面+"20EN"]; 預估材料總報價.text = Main.Global.系統語言字典[介面+"21EN"]; 總報價.text = Main.Global.系統語言字典[介面+"22EN"]; 總報價1.text = Main.Global.系統語言字典[介面+"22EN"]; 利潤比.text = Main.Global.系統語言字典[介面+"23EN"]; 利潤比1.text = Main.Global.系統語言字典[介面+"23EN"]; 利潤比2.text = Main.Global.系統語言字典[介面+"24EN"]; 利潤比3.text = Main.Global.系統語言字典[介面+"25EN"]; 預估利潤.text = Main.Global.系統語言字典[介面+"26EN"]; 折讓金額.text = Main.Global.系統語言字典[介面+"27EN"]; } else { 合約報價單審核.text = Main.Global.系統語言字典[介面+"00ID"]; // 建立合約資料.text = Main.Global.系統語言字典[介面+"01ID"]; //工程合約報價明細.text = Main.Global.系統語言字典[介面+"02ID"]; //合約清單_tb.text = Main.Global.系統語言字典[介面+"03ID"]; 合約編號.text = Main.Global.系統語言字典[介面+"04ID"]; 客戶名稱.text = Main.Global.系統語言字典[介面+"05ID"]; 負責人.text = Main.Global.系統語言字典[介面+"06ID"]; 負責人1.text = Main.Global.系統語言字典[介面+"06ID"]; 工程地點.text = Main.Global.系統語言字典[介面+"07ID"]; 地址.text = Main.Global.系統語言字典[介面+"08ID"]; 地址1.text = Main.Global.系統語言字典[介面+"08ID"]; 工程名稱_tb.text = Main.Global.系統語言字典[介面+"09ID"]; 公司名稱.text = Main.Global.系統語言字典[介面+"10ID"]; 中.text = Main.Global.系統語言字典[介面+"11ID"]; 英.text = Main.Global.系統語言字典[介面+"12ID"]; 印.text = Main.Global.系統語言字典[介面+"13ID"]; 簡.text = Main.Global.系統語言字典[介面+"29ID"]; 選擇語言.text = Main.Global.系統語言字典[介面+"14ID"]; 未折價前.text = Main.Global.系統語言字典[介面+"15ID"]; 報價小計.text = Main.Global.系統語言字典[介面+"16ID"]; 預估工資總成本.text = Main.Global.系統語言字典[介面+"17ID"]; 預估材料總成本.text = Main.Global.系統語言字典[介面+"18ID"]; 總成本.text = Main.Global.系統語言字典[介面+"19ID"]; 總成本1.text = Main.Global.系統語言字典[介面+"19ID"]; 預估工資總報價.text = Main.Global.系統語言字典[介面+"20ID"]; 預估材料總報價.text = Main.Global.系統語言字典[介面+"21ID"]; 總報價.text = Main.Global.系統語言字典[介面+"22ID"]; 總報價1.text = Main.Global.系統語言字典[介面+"22ID"]; 利潤比.text = Main.Global.系統語言字典[介面+"23ID"]; 利潤比1.text = Main.Global.系統語言字典[介面+"23ID"]; 利潤比2.text = Main.Global.系統語言字典[介面+"24ID"]; 利潤比3.text = Main.Global.系統語言字典[介面+"25ID"]; 預估利潤.text = Main.Global.系統語言字典[介面+"26ID"]; 折讓金額.text = Main.Global.系統語言字典[介面+"27ID"]; } } private void 初始化系統語言() { TextAsset txt = Resources.Load("Tran") as TextAsset; Main.Global.系統語言資料=txt.text.Split('\n'); for (int i = 1; i<=Main.Global.系統語言資料.Length; i++) { try { string key = Main.Global.系統語言資料[i].ToString().Substring(0, 3)+Main.Global.系統語言資料[i].ToString().Substring(4, 2)+Main.Global.系統語言資料[i].ToString().Substring(7, 2); Main.Global.系統語言字典.Add(key, Main.Global.系統語言資料[i].ToString().Substring(10)); } catch { // Debug.Log("No data"); } } } }