Beispiel #1
0
        public void ReadFileEvent()
        {
            if (this.InvokeRequired)
            {
                InvokeCompeitiveReadFile readCallback = new InvokeCompeitiveReadFile(ReadFileEvent);
                this.Invoke(readCallback, new object[] { });
            }
            else
            {
                string answerStr = fo.ReadFile();
                _rightList = new ArrayList();
                for (int i = 0; i < answerStr.Split(',').Length; i++)
                {
                    if (answerStr.Split(',')[i] != "" && answerStr.Split(',')[i].Split(':')[1] == _req_answer)
                    {
                        _rightList.Add(si[i].Name);
                    }
                }
                if (_rightList.Count > 2 || (answerStr.Split(',').Length - 1) == si.Length)
                {
                    t1.Enabled = false;
                    t.Enabled  = false;

                    if (f11 == null)
                    {
                        Common.uploadCompetitiveAnswer(_xitiId, _req_answer, answerStr, _rightList);

                        f11 = new Form11(_req_answer, _rightList);
                        f11.Show();
                    }
                    else
                    {
                    }
                }
            }
        }