コード例 #1
0
        public void Load()
        {
            TreeNode node = new TreeNode();

            node.Text = "Local";
            v.Nodes.Add(node);
            ArrayList C = DataSourceWizard.GetConnections();

            foreach (string c in C)
            {
                if (String.IsNullOrEmpty(c))
                {
                    continue;
                }
                TreeNode nodes = new TreeNode();
                nodes.Text     = c;
                nodes.ImageKey = "datasource";
                node.Nodes.Add(nodes);
                DataConnection d = new DataConnection();
                d.Load(c);
                nodes.Tag = d;
            }
            node      = new TreeNode();
            node.Text = "Network";
            v.Nodes.Add(node);
            node      = new TreeNode();
            node.Text = "Remote";
            v.Nodes.Add(node);
        }
コード例 #2
0
ファイル: DataViewerForm.cs プロジェクト: VE-2016/VE-2016
        public DataViewerForm()
        {
            InitializeComponent();

            C = DataSourceWizard.GetConnections();

            dg = dataGridView1;
        }
コード例 #3
0
        private void V_BeforeExpand(object sender, TreeViewCancelEventArgs e)
        {
            TreeNode node = e.Node;

            if (node.Text == "Services")
            {
                if (node.Nodes.Count != 1)
                {
                    return;
                }
                node.Nodes.Clear();
                Load_LocalServices(node);
            }
            else if (node.Text == "Performance Counters")
            {
                if (node.Nodes.Count != 1)
                {
                    return;
                }
                node.Nodes.Clear();
                Load_PerformanceCounters(node, System.Environment.MachineName);
            }
            else if (node.Text == "Event Logs")
            {
                if (node.Nodes.Count != 1)
                {
                    return;
                }
                node.Nodes.Clear();
                Load_EventLogs(node);
            }
            else
            {
                if (node.Nodes.Count == 1)
                {
                    if (node.Nodes[0].Text == "Oracle")
                    {
                        node.Nodes.Clear();
                        TreeNode ns = node.Parent;
                        if (ns == null)
                        {
                            return;
                        }
                        ns = ns.Parent;
                        if (ns == null)
                        {
                            return;
                        }
                        DataConnection dc = ns.Tag as DataConnection;
                        if (dc == null)
                        {
                            return;
                        }
                        DataSourceWizard.GetColumnsOracle(node, node.Text, dc.GetConnectionStringr());
                    }
                }
            }
        }
コード例 #4
0
        public void LoadConnections()
        {
            ArrayList C = DataSourceWizard.GetConnections();

            foreach (string c in C)
            {
                lb.Items.Add(c);
            }
        }
コード例 #5
0
        private void V_AfterSelect(object sender, TreeViewEventArgs e)
        {
            TreeNode node = e.Node;

            if (node.Tag != null)
            {
                if (node.Tag.GetType() == typeof(DataConnection))
                {
                    DataConnection d = node.Tag as DataConnection;

                    DataSourceWizard.LoadFromConnection(node, d);
                }
                ExplorerForms.ef.SetPropertyGridObject(node.Tag);
            }
        }
コード例 #6
0
        private void AddConnections(TreeNode node)
        {
            ArrayList C = DataSourceWizard.GetConnections();

            foreach (string c in C)
            {
                if (String.IsNullOrEmpty(c))
                {
                    continue;
                }
                TreeNode nodes = new TreeNode();
                nodes.Text     = c;
                nodes.ImageKey = "datasource";
                node.Nodes.Add(nodes);
                DataConnection d = new DataConnection();
                d.Load(c);
                nodes.Tag = d;
            }
        }
コード例 #7
0
ファイル: DataSourceForm.cs プロジェクト: VE-2016/VE-2016
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            GetVSProject();
            dw    = new DataSourceWizard();
            dw.vp = vp;

            DialogResult r = dw.ShowDialog();

            if (r != DialogResult.OK)
            {
                return;
            }
            if (dw.wz == DataSourceWizard.wizard.dataobjectsready)
            {
                ImportDataObjects(dw.dataSourceObjects, true);
            }
            else if (dw.wz == DataSourceWizard.wizard.databaseobjectsready)
            {
                ImportDatabaseObjects(dw.data);
            }
        }