コード例 #1
0
 private void button_enter_Click(object sender, EventArgs e)
 {
     if (comboBox1.SelectedItem != null)
     {
         string id = "0";
         using (StreamWriter sw = new StreamWriter("buf.txt", true))
         {
             for (int i = 0; i < list.Count; i++)
             {
                 if (list.ElementAt(i).Station.Equals(comboBox1.SelectedItem.ToString()))
                 {
                     id = list.ElementAt(i).station_id;
                 }
             }
             sw.Write(id);
         }
         lgoti frm = new lgoti();
         frm.Show();
         Close();
     }
     else
     {
         label1.Text = "Выберете станцию прибытия";
     }
 }
コード例 #2
0
        private void button_back_finalize_Click(object sender, EventArgs e)
        {
            lgoti frm = new lgoti();

            frm.Show();
            Close();
        }