123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- using UnityEngine.UI;
- using UnityEngine.Networking;
- using System.Text.RegularExpressions;
- using System.Data.SqlClient;
- using TMPro;
- using System;
- using System.IO;
- using ZXing;
- using ZXing.QrCode;
- using System.Net;
- using SimpleJSON;
- using System.ComponentModel;
-
- public class Main : MonoBehaviour
- {
-
- // Start is called before the first frame update
- void Start()
- {
-
-
- }
-
- public static class Global
- {
- public static string 使用者UID, 使用者暱稱, 使用者ID, 使用者GT, 使用者GA,伺服器;
- public static bool 螢幕方向,鏡頭啟動 , 回貼;
- public static int camfps;
- public static float rate , rate_ ,登入條件;
- //public static TimeSpan 運行天數;
- public static string PA, PB, PC, PD, PE, PF, PG, PH, PI, PJ, PK, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10;
- //public static bool[] 電表異常BL = new bool[999];
- // public static Sprite[] Wnum;
- // public static Sprite[] Bnum;
- public static string[] 系統語言資料;
- // public static string[] CC判斷=new string[999];
- public static Dictionary<string, string> 系統語言字典 = new Dictionary<string, string>() { };
- public static string[,] PHP = new string[5,2];
- private static readonly Dictionary<string, int> AgeMap = new Dictionary<string, int>()
- {
- {"甲子", 1}, {"乙丑", 2}, {"丙寅", 3}, {"丁卯", 4}, {"戊辰", 5}, {"己巳", 6},
- {"庚午", 7}, {"辛未", 8}, {"壬申", 9}, {"癸酉", 10}, {"甲戌", 11}, {"乙亥", 12},
- {"丙子", 13}, {"丁丑", 14}, {"戊寅", 15}, {"己卯", 16}, {"庚辰", 17}, {"辛巳", 18},
- {"壬午", 19}, {"癸未", 20}, {"甲申", 21}, {"乙酉", 22}, {"丙戌", 23}, {"丁亥", 24},
- {"戊子", 25}, {"己丑", 26}, {"庚寅", 27}, {"辛卯", 28}, {"壬辰", 29}, {"癸巳", 30},
- {"甲午", 31}, {"乙未", 32}, {"丙申", 33}, {"丁酉", 34}, {"戊戌", 35}, {"己亥", 36},
- {"庚子", 37}, {"辛丑", 38}, {"壬寅", 39}, {"癸卯", 40}, {"甲辰", 41}, {"乙巳", 42},
- {"丙午", 43}, {"丁未", 44}, {"戊申", 45}, {"己酉", 46}, {"庚戌", 47}, {"辛亥", 48},
- {"壬子", 49}, {"癸丑", 50}, {"甲寅", 51}, {"乙卯", 52}, {"丙辰", 53}, {"丁巳", 54},
- {"戊午", 55}, {"己未", 56}, {"庚申", 57}, {"辛酉", 58}, {"壬戌", 59}, {"癸亥", 60}
- };
-
- // 計算虛歲
- public static string CalculateAge(string currentYear, string inputYear)
- {
- int currentAge = AgeMap[currentYear];
- int inputAge = AgeMap[inputYear];
- int age = currentAge - inputAge + 1;
- if (age < 1)
- {
- age += 60;
- }
- // 處理虛歲在1到40之間的情況
- if (age <= 40)
- {
- return $" {age}歲 {age + 60}歲";
- }
- // 其他情況直接返回虛歲
- return $" {age}歲";
- }
- }
-
-
-
- public static void change_Secen(int _screenNum)
- {
-
- SceneManager.LoadScene(_screenNum);
- }
- public static void 截圖()
- {
- string fileName = string.Format("{0}/screenshot_{1}.png", Application.persistentDataPath, System.DateTime.Now.ToString("yyyyMMdd_HHmmss"));
- ScreenCapture.CaptureScreenshot(fileName);
- }
-
- }
|