コード例 #1
0
 public Form3(SsbEnum sType, object _ssbObj)
 {
     ssbTypeF3 = sType;
     InitializeComponent();
     SetupMenus();
     SetUpEventHooks();
     TVSetUp.SetUpTreeView(tv1);
     this.Text        = string.Format("Deploy {0}", ssbTypeF3.ToString());
     ssbObj           = _ssbObj;
     isDirty          = true;
     btnPaste.Enabled = false;
     browse           = false;
     btnPaste.Text    = "Paste/Deploy";
 }
コード例 #2
0
 public Form3(SsbEnum sType, bool _browse, Control ctrlToUpdate)
 {
     objName   = "";
     ctrl      = ctrlToUpdate;
     ssbTypeF3 = sType;
     InitializeComponent();
     SetupMenus();
     SetUpEventHooks();
     TVSetUp.SetUpTreeView(tv1);
     this.Text        = string.Format("Find {0}", ssbTypeF3.ToString());
     ssbObj           = null;
     isDirty          = true;
     btnPaste.Enabled = false;
     browse           = _browse;
     btnPaste.Text    = "OK";
 }
コード例 #3
0
        void tv1_BeforeExpand(object sender, System.Windows.Forms.TreeViewCancelEventArgs e)
        {
            TreeNode tn = e.Node;

            tv1.BeginUpdate();
            tv1.SelectedNode = tn;
            if (TVSetUp.ExpandNodes1(tv1, tn, false, true, ssbTypeF3))
            {
                tv1.SelectedNode = tn;
                tv1.EndUpdate();
            }

            else
            {
                e.Cancel = true;
                tv1.EndUpdate();
            }
        }
コード例 #4
0
        public static bool ExpandNodes1(TreeView tv1, TreeNode tn, bool refresh, bool filterSsb, SsbEnum sType)
        {
            SsbEnum ssbType = SsbEnum.None;

            ssbType = sType;
            SSBIServer serv = null;
            bool       res  = true;

            int lvl = tn.Level;

            try {
                if (lvl < 1)
                {
                    ssbType = SsbEnum.None;
                }

                else if (lvl == 1)
                {
                    ssbType = SsbEnum.Server;
                    serv    = (SSBIServer)tn.Tag;
                    if (!serv.HasLoggedIn)
                    {
                        res = false;
                        Connect(tv1, tn);
                    }
                    //SetUpSSBObject(tn.Tag);
                }
                else if (lvl == 2 && !filterSsb)
                {
                    ssbType = SsbEnum.Database;
                }
                else if (lvl == 2 && filterSsb)
                {
                    ssbType = sType;
                }

                else if (lvl > 2 && !filterSsb)
                {
                    ssbType = (SsbEnum)tn.Index;
                }
                else if (lvl > 2 && filterSsb)
                {
                    ssbType = sType;
                }

                if (lvl != 1)
                {
                    TVSetUp.ExpandNodes(tv1, tn, ref ssbType);
                }
                else if (lvl == 1 && serv.HasLoggedIn)
                {
                    TVSetUp.ExpandNodes(tv1, tn, ref ssbType);
                }

                //if (lvl == 3 && tabControl1.Visible)
                //  tabControl1.Visible = false;

                return(res);
            }
            catch (Exception ex) {
                smo.ShowException(ex);
                return(false);
            }
        }
コード例 #5
0
 void mnuSubOpenConn_Click(object sender, EventArgs e)
 {
     TVSetUp.Connect(tv1, tv1.SelectedNode);
 }