forked from shack2/SuperSQLInjectionV1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddNode.cs
More file actions
75 lines (66 loc) · 1.96 KB
/
Copy pathAddNode.cs
File metadata and controls
75 lines (66 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using tools;
namespace SuperSQLInjection
{
public partial class AddNode : Form
{
public AddNode()
{
InitializeComponent();
}
public TreeNode tn = null;
public TreeView tvw = null;
public int type = 0;
private void btn_addNode_Click(object sender, EventArgs e)
{
if (this.txt_node_text.TextLength <= 0)
{
MessageBox.Show("请输入节点的值!");
return;
}
TreeNode ctn = new TreeNode(this.txt_node_text.Text);
if (type == 1)
{
ctn.Tag = "dbs";
if (Tools.isExistsNode(tvw.Nodes,this.txt_node_text.Text))
{
MessageBox.Show("已存在相同的节点!");
}
else {
tvw.Nodes.Add(ctn);
}
}
else {
if (tn != null)
{
if ("dbs".Equals(tn.Tag))
{
ctn.Tag = "table";
}
else if ("table".Equals(tn.Tag))
{
ctn.Tag = "column";
}
if (Tools.isExistsNode(tn.Nodes, this.txt_node_text.Text))
{
MessageBox.Show("已存在相同的节点!");
}
else
{
tn.Nodes.Add(ctn);
}
}
else
{
MessageBox.Show("请选择添加表或列对应的数据库或表!");
}
}
}
}
}