Exemple #1
0
        private void EditPoint(bool message = true)
        {
            if (gridView.SelectedItem != null)
            {
                var sta = (IStation)gridView.SelectedItem;

                using (var vef = new VelocityEditForm(sta, route.Index))
                    if (vef.ShowModal(this) == DialogResult.Ok)
                    {
                        UpdateListView();
                    }
            }
            else if (message)
            {
                MessageBox.Show("Zuerst muss eine Zeile ausgewählt werden!", "Höchstgeschwindigkeit ändern");
            }
        }
Exemple #2
0
        private void AddPoint()
        {
            using (var vef = new VelocityEditForm(tt, route.Index))
            {
                if (vef.ShowModal(this) == DialogResult.Ok)
                {
                    var p = (BfplPoint)vef.Station;

                    var pos = p.Positions.GetPosition(route.Index);
                    if (pos < route.MinPosition || pos > route.MaxPosition)
                    {
                        MessageBox.Show($"Die Position muss im Streckenbereich liegen, also zwischen {route.MinPosition} und {route.MaxPosition}!", "FPLedit");
                        return;
                    }

                    attrs?.AddPoint(p);
                    UpdateListView();
                }
            }
        }