Exemple #1
0
        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);
     }
 }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        label = transform.Find("Label").GetComponent <Text>();

        LanguageNotification.GetInstance().AddListener(UpdateLabel);

        GetComponent <Toggle>().isOn = LScene.GetInstance().HaveBackground;
    }
Exemple #5
0
    public static void SwitchTo(int index)
    {
        LScene.Destroy();
        LanguageNotification.Destroy();
        MeshResource.Destroy();

        SceneManager.LoadScene(index);
    }
Exemple #6
0
    // Use this for initialization
    void Start()
    {
        GetComponent <Dropdown>().value =
            LScene.GetInstance().Language == SystemLanguage.Chinese ?
            0 : 1;

        LanguageNotification.GetInstance().AddListener(UpdateLabel);
    }
Exemple #7
0
    public static LanguageNotification GetInstance()
    {
        if (instance == null)
        {
            instance = new LanguageNotification();
        }

        return(instance);
    }
Exemple #8
0
    public void ValueChange(int value)
    {
        LScene.GetInstance().Language =
            value == 0 ?
            SystemLanguage.Chinese :
            SystemLanguage.English;

        LanguageNotification.GetInstance().Notification();
    }
Exemple #9
0
 public override bool check(string input, LanguageNotification l)
 {
     if (input.Length <= max)
     {
         return(true);
     }
     this.Message = l.getErrorMessage(this.Code);
     return(false);
 }
Exemple #10
0
 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);
    }
Exemple #12
0
        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);
        }
Exemple #13
0
 private void comboValidationLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (comboValidationLanguage.SelectedIndex == 0)
     {
         lNotify = lFac.getNotificationType("vi");
     }
     else
     {
         lNotify = lFac.getNotificationType("en");
     }
 }
Exemple #14
0
        public MainWindow()
        {
            InitializeComponent();

            lNotify          = lFac.getNotificationType("vi");
            creditCheck      = new CreditCard();
            phoneCheck       = new Phone();
            emailCheck       = new IsEmail();
            emailDocComCheck = new IsEmailExtension(new IsEmail());
            passwordCheck    = new IsPassword();
        }
Exemple #15
0
 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);
 }
Exemple #16
0
        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);
        }
Exemple #17
0
        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);
        }
Exemple #18
0
        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);
            }
        }
Exemple #19
0
        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);
            }
        }
Exemple #20
0
        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);
            }
        }
Exemple #21
0
 protected string Message; // Thông báo
 public virtual bool check(string input, LanguageNotification l)
 {
     return(true);
 }
Exemple #22
0
 public static void Destroy()
 {
     instance = null;
 }
Exemple #23
0
 void Start()
 {
     UpdateLabel();
     LanguageNotification.GetInstance().AddListener(UpdateLabel);
 }