예제 #1
0
        private void buttonAddArea_Click(object sender, RoutedEventArgs e)
        {
            var windowAddArea = new Windows.ScopeWindows.EditNameWindow();

            if (windowAddArea.ShowDialog() == true)
            {
                _scope.Add(new Area()
                {
                    Name = windowAddArea.AreaName
                });
                UpdateDataGridArea();
            }
        }
예제 #2
0
        private void dataGridMenyAreaEditName_Click(object sender, RoutedEventArgs e)
        {
            var selected = dataGridArea.SelectedItem as MyArea;

            if (selected == null)
            {
                return;
            }
            var windowAddArea = new Windows.ScopeWindows.EditNameWindow(selected.Name);

            if (windowAddArea.ShowDialog() == true)
            {
                selected.Area.Name = windowAddArea.AreaName;
                UpdateDataGridArea();
            }
        }