コード例 #1
0
        private void treeView_ClickAdd(object sender, PNRoutedEventArgs e)
        {
            var item     = e.SourceItem as CateDataItem;
            var new_item = item.Creator(item);

            new_item.IsNew      = true;
            new_item.IsSelected = true;
        }
コード例 #2
0
        private void treeView_ClickEdit(object sender, PNRoutedEventArgs e)
        {
            var page = frame.Content as EditorPage;

            if (page != null)
            {
                page.IsEditable = true;
            }
        }
コード例 #3
0
ファイル: TestPage.xaml.cs プロジェクト: srdgame/wpf_test
        private void treeView_ClickDelete(object sender, PNRoutedEventArgs e)
        {
            var item   = e.SourceItem as PNTreeViewItem;
            var parent = item.Parent;

            if (parent != null)
            {
                parent.Children.Remove(item);
            }
            else
            {
                _item_list.Remove(item);
            }
        }
コード例 #4
0
ファイル: TestPage.xaml.cs プロジェクト: srdgame/wpf_test
        private void treeView_ClickAdd(object sender, PNRoutedEventArgs e)
        {
            var item     = e.SourceItem as TestData;
            var new_item = new TestData(new test_data_rpc()
            {
                type   = PNItemType.LEAF,
                id     = Guid.NewGuid().ToString(),
                name   = "New Tag",
                desc   = "",
                parent = item.Data as test_data_rpc,
            }, item);

            new_item.IsNew      = true;
            new_item.IsSelected = true;
        }
コード例 #5
0
        private void treeView_ClickAdd(object sender, PNRoutedEventArgs e)
        {
            var item     = e.SourceItem as CMNode;
            var new_item = new CMNode(new cm_node_rpc()
            {
                id       = Guid.NewGuid().ToString(),
                name     = "New Node",
                desc     = "",
                parent   = item.Data as cm_node_rpc,
                children = new List <cm_node_rpc>(),
                category = _categories.First() as cm_node_category_rpc,
                creator  = new sys_user_rpc()
                {
                    id = m_Main.UserInfo.id,
                },
            }, item);

            new_item.IsNew      = true;
            new_item.IsSelected = true;
        }
コード例 #6
0
        private void treeView_ClickDelete(object sender, PNRoutedEventArgs e)
        {
            var item = e.SourceItem as PNTreeViewItem;
            var data = item.Data as cm_node_rpc;

            if (m_Main.Client.remove_cm_node(data.id) != 0)
            {
                return;
            }
            if (data.parent != null)
            {
                data.parent.children.Remove(data);
            }
            var parent = item.Parent;

            if (parent != null)
            {
                parent.Children.Remove(item);
            }
            else
            {
                _item_list.Remove(item);
            }
        }
コード例 #7
0
ファイル: UnitMgr.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickEdit(object sender, PNRoutedEventArgs e)
 {
     var page = frame.Content as EditorPage;
     page.IsEditable = true;
 }
コード例 #8
0
ファイル: UnitMgr.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickDelete(object sender, PNRoutedEventArgs e)
 {
     var item = e.SourceItem as PNTreeViewItem;
     var data = item.Data as cm_node_rpc;
     if (m_Main.Client.remove_cm_node(data.id) != 0)
     {
         return;
     }
     if (data.parent != null)
         data.parent.children.Remove(data);
     var parent = item.Parent;
     if (parent != null)
     {
         parent.Children.Remove(item);
     }
     else
     {
         _item_list.Remove(item);
     }
 }
コード例 #9
0
ファイル: UnitMgr.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickAdd(object sender, PNRoutedEventArgs e)
 {
     var item = e.SourceItem as CMNode;
     var new_item = new CMNode(new cm_node_rpc()
     {
         id = Guid.NewGuid().ToString(),
         name = "New Node",
         desc = "",
         parent = item.Data as cm_node_rpc,
         children = new List<cm_node_rpc>(),
         category = _categories.First() as cm_node_category_rpc,
         creator = new sys_user_rpc()
         {
             id = m_Main.UserInfo.id,
         },
     }, item);
     new_item.IsNew = true;
     new_item.IsSelected = true;
 }
コード例 #10
0
ファイル: UsersPage.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickDelete(object sender, PNRoutedEventArgs e)
 {
 }
コード例 #11
0
ファイル: UsersPage.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickAdd(object sender, PNRoutedEventArgs e)
 {
     var item = e.SourceItem as CateDataItem;
     var new_item = item.Creator(item);
     new_item.IsNew = true;
     new_item.IsSelected = true;
 }
コード例 #12
0
ファイル: TestPage.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickDelete(object sender, PNRoutedEventArgs e)
 {
     var item = e.SourceItem as PNTreeViewItem;
     var parent = item.Parent;
     if (parent != null)
     {
         parent.Children.Remove(item);
     }
     else
     {
         _item_list.Remove(item);
     }
 }
コード例 #13
0
ファイル: TestPage.xaml.cs プロジェクト: srdgame/wpf_test
 private void treeView_ClickAdd(object sender, PNRoutedEventArgs e)
 {
     var item = e.SourceItem as TestData;
     var new_item = new TestData(new test_data_rpc()
     {
         type = PNItemType.LEAF,
         id = Guid.NewGuid().ToString(),
         name = "New Tag",
         desc = "",
         parent = item.Data as test_data_rpc,
     }, item);
     new_item.IsNew = true;
     new_item.IsSelected = true;
 }
コード例 #14
0
 private void treeView_ClickDelete(object sender, PNRoutedEventArgs e)
 {
 }