Exemplo n.º 1
0
        public void ChangeArcToExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            var f = new AddChangeArc(_myWeb, "Изменение вершины, откуда выходит дуга", 3)
            {
                AllowManyAddings = false,
                From             = _selectedArc.From,
                ArcName          = _selectedArc.Name,
                To = _selectedArc.To
            };

            if (f.ShowDialog() != true)
            {
                return;
            }
            try
            {
                _myWeb.ChangeArcDirectionTo(_selectedArc.From.ID, _selectedArc.Name,
                                            _selectedArc.To.ID, f.To.ID);
                SetDataContext();
                RefreshAll();
                _somethingChanged = true;
                NormalizeStatusBar();
            }
            catch (ArgumentException ex)
            {
                ErrorStatusBar(ex.Message);
            }
        }
Exemplo n.º 2
0
        public void AddArcExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            var f = new AddChangeArc(_myWeb, "Добавление дуги", 0)
            {
                AllowManyAddings = true
            };

            f.EventAddAgain += ArcEventHandler;
            f.ShowDialog();
            f.EventAddAgain -= ArcEventHandler;
        }