Esempio n. 1
0
    public static Boolean KiemTra(String Chuoi)
    {
        Boolean flag = true;

        String[] M = Chuoi.Split(new String[] { ChuoiPhanCach },
                                 StringSplitOptions.None);
        flag = M.Length == 2;
        flag = flag && XuLySoNguyen.KiemTra(M[1]);
        return(flag);
    }
    public static Boolean KiemTra(String Chuoi)
    {
        Boolean kq = true;

        String[] M = Chuoi.Split(new String[] { ChuoiPhanCach }, StringSplitOptions.None);
        kq = M.Length == 2;
        if (kq)
        {
            kq = kq && XuLySoNguyen.KiemTra(M[1]);
        }
        return(kq);
    }
    public static Boolean KiemTra(String Chuoi)
    {
        Boolean temp = true;

        String[] M = Chuoi.Split(new String[] { ChuoiPhanCach }, StringSplitOptions.None);
        temp = (M.Length == 2);
        if (temp)
        {
            temp = temp && XuLySoThuc.KiemTra(M[0]) && XuLySoNguyen.KiemTra(M[1]);
        }
        return(temp);
    }
    public static Boolean KiemTra(String Chuoi)
    {
        String[] M = Chuoi.Split(new String[] { "*", "+", "-" },
                                 StringSplitOptions.None);
        Boolean flag = M.Length == 2;

        if (flag)
        {
            flag = flag && XuLySoNguyen.KiemTra(M[0]) && XuLySoNguyen.KiemTra(M[1]);
        }
        return(flag);
    }
    public static Boolean KiemTra(String Chuoi)
    {
        Boolean kq = true;

        String[] M = Chuoi.Split(new String[] { ChuoiPhanCach },
                                 StringSplitOptions.None);
        kq = M.Length >= 3;
        for (int i = 2; i < M.Length; i++)
        {
            kq = XuLySoNguyen.KiemTra(M[i]);
            if (!kq)
            {
                break;
            }
        }
        return(kq);
    }
Esempio n. 6
0
    public static Boolean KiemTra(String Chuoi)
    {
        Boolean flag = true;

        String[] M = Chuoi.Split(new String[] { ChuoiPhanCach },
                                 StringSplitOptions.None);
        flag = M.Length > 0;
        for (int i = 0; flag && i < M.Length; i++)
        {
            String[] N = M[i].Split(new String[] { " " },
                                    StringSplitOptions.None);
            flag = N.Length == 2;
            if (flag)
            {
                flag = XuLySoNguyen.KiemTra(N[1].Trim());
            }
        }
        return(flag);
    }
    public static Boolean KiemTra(String Chuoi)
    {
        Boolean flag = true;

        String[] M = Chuoi.Split(new String[] { ChuoiPhanCach },
                                 StringSplitOptions.None);
        flag = M.Length >= 3;
        for (int i = 1; flag && (i < M.Length - 1); i++)
        {
            flag = XuLyLoaiPhong.KiemTra(M[i]);
        }
        String[] N = M[M.Length - 1].Split(new String[] { ";" },
                                           StringSplitOptions.None);
        flag = flag && N.Length == 2;
        if (flag)
        {
            flag = flag && XuLySoNguyen.KiemTra(N[0]);
            flag = flag && XuLySoNguyen.KiemTra(N[1]);
        }
        return(flag);
    }