Ejemplo n.º 1
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var item   = treeView.SelectedItem as TestData;
            var editor = item.CreateEditor(item.CloneData());

            (editor as TestEditor).NodeList = _item_list;

            var page = new frames.EditorPage()
            {
                Editor = editor,

                /*
                 * Editor = new TestEditor()
                 * {
                 *  DataContext = item.CloneData(),
                 *  NodeList = _item_list,
                 *  //SelectedNode = item.Parent,
                 * },
                 */
            };

            page.Save += OnSave;
            frame.Navigate(page);
            if (item.IsNew)
            {
                page.IsEditable = true;
            }
        }
Ejemplo n.º 2
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var item   = treeView.SelectedItem as PNTreeViewItem;
            var editor = item.CreateEditor(item.CloneData());

            if (editor == null)
            {
                frame.Navigate(null);
                return;
            }
            if (editor as SYSGroupEditor != null)
            {
                (editor as SYSGroupEditor).NodeList = _node_list;
                (editor as SYSGroupEditor).RoleList = _role_list;
            }

            var page = new frames.EditorPage()
            {
                Editor = editor,
            };

            page.Save += OnSave;
            frame.Navigate(page);
            if (item.IsNew)
            {
                page.IsEditable = true;
            }
        }
Ejemplo n.º 3
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var v    = treeView.SelectedItem as CMNode;
            var page = new frames.EditorPage()
            {
                Editor = new CMNodeEditor()
                {
                    DataContext = v.CloneData(),
                    Categories  = _categories,
                    NodeList    = _item_list,
                },
            };

            page.Save += OnSave;
            frame.Navigate(page);

            if (v.IsNew)
            {
                page.IsEditable = true;
            }
        }
Ejemplo n.º 4
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            var v = treeView.SelectedItem as CMNode;
            var page = new frames.EditorPage()
            {
                Editor = new CMNodeEditor()
                {
                    DataContext = v.CloneData(),
                    Categories = _categories,
                    NodeList = _item_list,
                },
            };
            page.Save += OnSave;
            frame.Navigate(page);

            if (v.IsNew)
            {
                page.IsEditable = true;
            }
        }
Ejemplo n.º 5
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            var item = treeView.SelectedItem as PNTreeViewItem;
            var editor = item.CreateEditor(item.CloneData());
            if (editor == null)
            {
                frame.Navigate(null);
                return;
            }
            if (editor as SYSGroupEditor != null)
            {
                (editor as SYSGroupEditor).NodeList = _node_list;
                (editor as SYSGroupEditor).RoleList = _role_list;
            }

            var page = new frames.EditorPage()
            {
                Editor = editor,
            };
            page.Save += OnSave;
            frame.Navigate(page);
            if (item.IsNew)
            {
                page.IsEditable = true;
            }
        }
Ejemplo n.º 6
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            var item = treeView.SelectedItem as TestData;
            var editor = item.CreateEditor(item.CloneData());
            (editor as TestEditor).NodeList = _item_list;

            var page = new frames.EditorPage()
            {
                Editor = editor,
                /*
                Editor = new TestEditor()
                {
                    DataContext = item.CloneData(),
                    NodeList = _item_list,
                    //SelectedNode = item.Parent,
                },
                */
            };
            page.Save += OnSave;
            frame.Navigate(page);
            if (item.IsNew)
            {
                page.IsEditable = true;
            }
        }