Exemplo n.º 1
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     using (Views.DodajPrzystanekDoTrasy InnerForm = new Views.DodajPrzystanekDoTrasy())
         if (InnerForm.ShowDialog() == DialogResult.OK)
         {
             InnerForm.GetStop.putInListBox(this.mainListBox);
         }
 }
Exemplo n.º 2
0
        private void MainListBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (this.mainListBox.SelectedItem == null)
            {
                return;
            }
            int index = this.mainListBox.SelectedIndex;

            using (Views.DodajPrzystanekDoTrasy InnerForm =
                       new Views.DodajPrzystanekDoTrasy(new Models.routeElementModel(this.mainListBox.SelectedItem.ToString())))
                if (InnerForm.ShowDialog() == DialogResult.OK)
                {
                    this.mainListBox.Items.RemoveAt(index);
                    InnerForm.GetStop.putInListBoxAt(this.mainListBox, index);
                }
        }