Esempio n. 1
0
 public TableMgr()
 {
     for (int i = 0; i < 9; ++i)
     {
         m_check_table[i]          = new SetTable();
         m_check_eye_table[i]      = new SetTable();
         m_check_feng_table[i]     = new SetTable();
         m_check_feng_eye_table[i] = new SetTable();
     }
 }
Esempio n. 2
0
 private void frmSetInfoEdit_Load(object sender, EventArgs e)
 {
     if (_id != 0)
     {
         SetTable model = _dal.GetModel(_id);
         txtMySqlColumn.Text     = model.SetText;
         txtSqlServerColumn.Text = model.SetValue; chkPK.Checked = model.Remark.Trim() != string.Empty;
         txtChangLiang.Text      = model.ChangLiang;
     }
 }
Esempio n. 3
0
    public void Start()
    {
        //pre-stage setup
        st           = GameObject.Find("TableFunction").GetComponent <SetTable>();
        tableOptions = new List <string>();
        deck         = new Deck();
        players      = new List <Player>();

        player = new Player();
        dealer = new Player();
        moneyField.GetComponent <TextMeshProUGUI>().text = player.playerWallet.money.ToString();
        betAmount  = 0;
        gameStatus = false;

        gap = 0;
    }
Esempio n. 4
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     //if (txtSetValue.Text.Trim() == string.Empty)
     //{
     //    MessageBox.Show("请输入编号");
     //    this.txtSetValue.Select();
     //    return;
     //}
     //if (txtSetText.Text.Trim() == string.Empty)
     //{
     //    MessageBox.Show("请输入名称");
     //    this.txtSetText.Select();
     //    return;
     //}
     if (_id != 0)//修改
     {
         ////已经存在
         //DataSet ds = dal.GetList("State=1 and id!=" + id + " and SetKey='"+setordkey+"' and SetValue='" + txtSetValue.Text.Trim() + "' ");
         //if (ds != null && ds.Tables[0].Rows.Count > 0)
         //{
         //    MessageBox.Show("该编号已经存在");
         //    txtSetValue.Select();
         //}
         //else
         //{
         SetTable model = _dal.GetModel(_id);
         model.SetValue   = txtSqlServerColumn.Text.Trim();
         model.SetText    = txtMySqlColumn.Text.Trim();
         model.Remark     = chkPK.Checked.ToString();
         model.ChangLiang = txtChangLiang.Text.Trim();
         bool flag = _dal.Update(model);
         if (flag)
         {
             DialogResult = DialogResult.OK;
             Close();
         }
         //}
     }
     else
     {
         //  //已经存在
         //DataSet ds = dal.GetList("State=1   and SetKey='" + setordkey + "'   and SetValue='" + txtSetValue.Text.Trim() + "' ");
         //if (ds != null && ds.Tables[0].Rows.Count > 0)
         //{
         //    MessageBox.Show("该编号已经存在");
         //    this.txtSetValue.Select();
         //    return;
         //}
         //else
         //{
         SetTable model = new SetTable
         {
             SetText    = txtMySqlColumn.Text.Trim(),
             SetValue   = txtSqlServerColumn.Text.Trim(),
             State      = 1,
             SetKey     = _setordkey,
             Remark     = chkPK.Checked.ToString(),
             ChangLiang = txtChangLiang.Text.Trim()
         };
         int res = _dal.Add(model);
         if (res >= 0)
         {
             this.DialogResult = DialogResult.OK;
             this.Close();
         }
         //}
     }
 }
Esempio n. 5
0
        public static void Main(string[] args)

        {
            string inFile          = "LEXICON";
            string autoFixFile     = "LEXICON.fix";
            bool   verbose         = false;
            string prepositionFile = "../data/Files/prepositions.data";
            string dupRecExpFile   = "../data/Files/dupRecExceptions.data";
            string notBaseFormFile = "../data/Files/notBaseForm.data";

            if (args.Length == 6)

            {
                inFile      = args[0];
                autoFixFile = args[1];
                if (args[2].Equals("-v") == true)

                {
                    verbose = true;
                }

                prepositionFile = args[3];
                dupRecExpFile   = args[4];
                notBaseFormFile = args[5];
            }
            else if (args.Length == 3)

            {
                inFile      = args[0];
                autoFixFile = args[1];
                if (args[2].Equals("-v") == true)

                {
                    verbose = true;
                }
            }
            else if (args.Length == 2)

            {
                inFile      = args[0];
                autoFixFile = args[1];
            }
            else if (args.Length == 1)

            {
                inFile      = args[0];
                autoFixFile = inFile + ".fix";
            }
            else if (args.Length >= 0)

            {
                Console.Error.WriteLine(
                    "** Usage: java LexCrossCheck <inFile> <outFile> <-v> <prepositionFile> <dupRecExpFile> <notBaseFormFile>");
                Console.Error.WriteLine("");
                Console.Error.WriteLine("Options:");
                Console.Error.WriteLine("  inFile: LEXICON in text format");
                Console.Error.WriteLine("  outFile: auto-fixed LEXICON in text format");
                Console.Error.WriteLine("  -v: verbose");
                Console.Error.WriteLine("  prepositionFile: preposition file");
                Console.Error.WriteLine("  dupRecExpFile: dup record exception file");
                Console.Error.WriteLine("  notBaseFormFile: not base form file");
                Environment.Exit(1);
            }

            if (verbose == true)

            {
                Console.WriteLine("===== LexCrossCheck( ) =====");
                Console.WriteLine("-- inFile: " + inFile);
                Console.WriteLine("-- autoFixFile: " + autoFixFile);
                Console.WriteLine("-- prepositionFile: " + prepositionFile);
                Console.WriteLine("-- dupRecExpFile: " + dupRecExpFile);
                Console.WriteLine("-- notBaseFormFile: " + notBaseFormFile);
            }

            Lib.GlobalVars.SetPrepositionFile(prepositionFile);

            int lineNum = 500;

            Dictionary <string, HashSet <string> > dupRecExpList =
                KeyValuesTable.GetKey2ValuesTable(dupRecExpFile, verbose, lineNum);


            bool useDefaultFileFlag = false;

            HashSet <string> notBaseFormSet = SetTable.GetSetTabe(notBaseFormFile, verbose, lineNum, useDefaultFileFlag);


            CrossCheckLexRecords.CheckFromFile(inFile, autoFixFile, verbose, dupRecExpList, notBaseFormSet);
        }