Example #1
0
        private long assign_train_from_dialog()
        {
            int i = m_list.SelectedItemCount;

            if (i != 1)
            {
                return(-1);
            }

            long l = m_list.GetNextItem(-1, ListCtrl.NEXT.ALL, ListItemState.SELECTED);

            if (l >= 0)
            {
                Globals.assign_train(assign_list[l], assign_tr);
            }
            EndModal(ShowModalResult.OK);
            return(l);
        }