Example #1
0
 void Start()
 {
     try
     {
         //Console = FindObjectOfType<ConsoleBehaviour>();
         path = Application.dataPath + "/StreamingAssets/dictionaryInput.txt";
         //Console.GetComponent<ConsoleBehaviour>().write(path);
         //Console.write(path);
         wordsDictionary = new wordsManager();
         wordsDictionary.readWordsFromFile(path, amountWordsToRead);
         initWord();
     }
     catch (System.Exception e)
     {
         //Console.write(e.Message);
     }
 }
Example #2
0
        //显示单词的方法
        public void dcx()
        {
            Lv1.Items.Clear();
            wordsManager         wd = new wordsManager();
            List <Coursedetails> c  = wd.wor();

            foreach (Coursedetails cc in c)
            {
                ListViewItem tt  = new ListViewItem(cc.C_id.ToString());
                string       im  = cc.Cd_right_pic.ToString();
                string       im2 = cc.Cd_wrong_pic1.ToString();
                string       im3 = cc.Cd_wrong_pic2.ToString();
                string       im4 = cc.Cd_wrong_pic3.ToString();
                Lv1.SmallImageList = imageList1;

                this.imageList1.Images.Add(Image.FromFile(im));
                this.imageList1.Images.Add(Image.FromFile(im2));
                this.imageList1.Images.Add(Image.FromFile(im3));
                this.imageList1.Images.Add(Image.FromFile(im4));

                tt.SubItems.Add(cc.Cd_name.ToString());
                tt.SubItems.Add(cc.Cd_yinbiao.ToString());
                tt.SubItems.Add(cc.Cd_mean.ToString());
                tt.SubItems.Add(cc.Cd_sentence.ToString());


                Lv1.Items.Add(tt);

                //    pictureBox1.Image = Image.FromFile(im);
                //    pictureBox2.Image = Image.FromFile(im2);
                //    pictureBox3.Image = Image.FromFile(im3);
                //    pictureBox4.Image = Image.FromFile(im4);
                //    lv3.Items.Add(tt);
                //}
            }
        }