private void butAdd_Click(object sender, RoutedEventArgs e)
        {
            // prompt for screen name and namespace to add.
            var model = new WorkScreenDefnModel(ActionCode.Add);
            var wdw   = new AddScreenDefnWindow();

            wdw.WorkScreenDefnModel = model;
            var rv = wdw.ShowDialog();

            // entry completed. add new screenDefn.
            if (rv == true)
            {
                var defn = model.ToScreenDefn();
                this.ScreenDefnObservableList.Add(defn);
            }
        }
Пример #2
0
 private void AddScreenDefnWindow_Loaded(object sender, RoutedEventArgs e)
 {
     this.Model       = new WorkScreenDefnModel(this.WorkScreenDefnModel);
     this.DataContext = this.Model;
 }