/// <summary> /// 发车语音播报 /// </summary> public void SpeechFa() { LedShow led = new LedShow(); string text1 = null; string text2 = null; string[] str1, str2; string ent1 = "intp65"; string vcn1 = "xiaoyan"; string ent2 = "intp65"; string vcn2 = "henry"; SelectStation sel = new SelectStation(); SpeechOperat spo = new SpeechOperat(); List <Common> listCom = new List <Common>(); List <SpeechModel> listSpFa = new List <SpeechModel>(); List <SpeechModel> listSpJin = new List <SpeechModel>(); Speech sp = new Speech(); str1 = sel.SelectFirstStation().Split(','); str2 = sel.SelectLastStation().Split(','); listCom = sel.SelectComboBoxStation(); text1 = ",惠而浦冰箱洗衣机提醒您,列车已经由 " + this.dataGridView1.Rows[m - 1].Cells[0].Value.ToString() + " 开出,前方到站 " + this.dataGridView1.Rows[m].Cells[0].Value.ToString(); text2 = "Whirlpool refrigerator and washing machine remind you,The train has been started from " + this.dataGridView1.Rows[m - 1].Cells[1].Value.ToString() + " Station " + "and next station is " + this.dataGridView1.Rows[m].Cells[1].Value.ToString() + " Station"; text1 = text1 + ",本次列车为 " + this.textBox1.Text + " 次列车,由 " + this.textBox2.Text + " 发往 " + this.textBox3.Text + ",途径"; text2 = text2 + ",This train is " + this.textBox1.Text + " train,and is sent from " + str1[1] + " Station to " + str2[1] + " Station,channel "; for (int i = 1; i < listCom.Count - 1; i++) { text1 = text1 + listCom[i].StationName + "、"; text2 = text2 + listCom[i].StationEnName + " Station,"; } listSpFa = spo.SelectSp("欢迎提示语"); listSpJin = spo.SelectSp("禁烟提示语"); for (int i = 0; i < listSpFa.Count; i++) { text1 = listSpFa[i].speechContent + text1; text2 = listSpFa[i].speechEnContent + text2; } for (int i = 0; i < listSpJin.Count; i++) { text1 = text1 + listSpJin[i].speechContent; text2 = text2 + listSpJin[i].speechEnContent; } led.ShowLEDMessage(text1 + " " + text2 + " ", this.textBox1.Text, this.textBox17.Text); sp.SpeechTest(text1, ent1, vcn1); sp.SpeechTest(text2, ent2, vcn2); int RowNum = this.dataGridView1.Rows.Count; Thread.Sleep(102000 + (RowNum - 13) * 2 * 1000); // 停顿秒数 LedSWShow(); }
/// <summary> ///加载运行线路各个站名称(comboBox数据) /// </summary> public void ComboBoxDetails() { SelectStation sel = new SelectStation(); List <Common> listCom = new List <Common>(); listCom = sel.SelectComboBoxStation(); ArrayList list = new ArrayList(); for (int i = 0; i < listCom.Count; i++) { list.Add(listCom[i].StationName); } comboBox1.DataSource = list; }