protected override void Start() { base.Start(); LanguageNotification.GetInstance().Notification(); StartCoroutine(StartEvent()); }
// Use this for initialization void Start() { LanguageNotification ln = LanguageNotification.GetInstance(); ln.AddListener(UpdateLabel); ln.Notification(); }
// Start is called before the first frame update protected virtual void Start() { if (Label != null) { LanguageNotification.GetInstance().AddListener(UpdateLabel); } }
// Use this for initialization void Start() { label = transform.Find("Label").GetComponent <Text>(); LanguageNotification.GetInstance().AddListener(UpdateLabel); GetComponent <Toggle>().isOn = LScene.GetInstance().HaveBackground; }
public static void SwitchTo(int index) { LScene.Destroy(); LanguageNotification.Destroy(); MeshResource.Destroy(); SceneManager.LoadScene(index); }
// Use this for initialization void Start() { GetComponent <Dropdown>().value = LScene.GetInstance().Language == SystemLanguage.Chinese ? 0 : 1; LanguageNotification.GetInstance().AddListener(UpdateLabel); }
public static LanguageNotification GetInstance() { if (instance == null) { instance = new LanguageNotification(); } return(instance); }
public void ValueChange(int value) { LScene.GetInstance().Language = value == 0 ? SystemLanguage.Chinese : SystemLanguage.English; LanguageNotification.GetInstance().Notification(); }
public override bool check(string input, LanguageNotification l) { if (input.Length <= max) { return(true); } this.Message = l.getErrorMessage(this.Code); return(false); }
public override bool check(string input, LanguageNotification l) { if (string.IsNullOrEmpty(input)) { this.Message = l.getErrorMessage(this.Code); return(true); } return(false); }
// Use this for initialization void Start() { mainCameraMove = GameObject.Find("Main Camera").GetComponent <Camera>().GetComponent <CameraMove>(); mainCameraMove.Adaptive = true; label = transform.Find("Label").GetComponent <Text>(); LanguageNotification.GetInstance().AddListener(UpdateLabel); }
public override bool check(string input, LanguageNotification l) { if (string.Compare(input, this.compare) == 0) { return(true); } this.Message = l.getErrorMessage(this.Code); return(false); }
private void comboValidationLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (comboValidationLanguage.SelectedIndex == 0) { lNotify = lFac.getNotificationType("vi"); } else { lNotify = lFac.getNotificationType("en"); } }
public MainWindow() { InitializeComponent(); lNotify = lFac.getNotificationType("vi"); creditCheck = new CreditCard(); phoneCheck = new Phone(); emailCheck = new IsEmail(); emailDocComCheck = new IsEmailExtension(new IsEmail()); passwordCheck = new IsPassword(); }
private bool addCheckViettel(string input, LanguageNotification l) { if (input.Substring(0, 3) == "086" || input.Substring(0, 3) == "096" || input.Substring(0, 3) == "097" || input.Substring(0, 3) == "098" || input.Substring(0, 3) == "032" || input.Substring(0, 3) == "033" || input.Substring(0, 3) == "034" || input.Substring(0, 3) == "035" || input.Substring(0, 3) == "036" || input.Substring(0, 3) == "037" || input.Substring(0, 3) == "038" || input.Substring(0, 3) == "039") { return(true); } this.Message += "Khong phai dau so Viettel"; return(false); }
public override bool check(string input, LanguageNotification l) { if (validator.check(input, l) == true) { if (addCheckViettel(input, l) == true) { return(true); } } this.Message += validator.getMessage(); return(false); }
private bool addCheckCom(string input, LanguageNotification l) { if (input.Length > 5) { if (input.Substring(input.Length - 4) == ".com") { return(true); } this.Message += "Email khong dung dinh dang .com"; return(false); } return(false); }
public override bool check(string input, LanguageNotification l) { try{ int a = int.Parse(input); if (a.IsGreaterThan(index)) { return(true); } this.Message = l.getErrorMessage(this.Code); return(false); } catch { this.Message = l.getErrorMessage(this.Code); return(false); } }
public override bool check(string input, LanguageNotification l) { try { int a = int.Parse(input); if (a.IsExclusiveBetween(from, to)) { return(true); } this.Message = l.getErrorMessage(this.Code); return(false); } catch { this.Message = l.getErrorMessage(this.Code); return(false); } }
public override bool check(string input, LanguageNotification l) { try { if (input.Length != 0) { //Tính tổng các chữ số từ chữ số thứ nhất bên phải qua cách nhau một chữ số for (i = input.Length - 1; i >= 0; i -= 2) { this.checkSum += (input[i] - '0'); } ////Tính tổng các chữ số từ chữ số thứ hai bên phải qua cách nhau một chữ số for (i = input.Length - 2; i >= 0; i -= 2) { int val = ((input[i] - '0') * 2); while (val > 0) { checkSum += (val % 10); val /= 10; } } if ((checkSum % 10) == 0) { return(true); } } this.Message = l.getErrorMessage(this.Code); return(false); } catch { this.Message = l.getErrorMessage(this.Code); return(false); } }
protected string Message; // Thông báo public virtual bool check(string input, LanguageNotification l) { return(true); }
public static void Destroy() { instance = null; }
void Start() { UpdateLabel(); LanguageNotification.GetInstance().AddListener(UpdateLabel); }