Esempio n. 1
0
        private void FillAttributes(int row)
        {
            if (row == ListBox.NoMatches)
            {
                return;
            }

            string classname = this.lbClasses.Items[row].ToString();

            if ((string)this.lbAttribs.Tag == classname)
            {
                return;
            }

            string        localname = ForestBase.ClassCache.Where(c => c.Value == classname).Select(l => l.Key).ToList()[0];
            List <string> attribs   = ForestInfo.LoadClassInfoFromCache(localname);

            this.lbAttribs.Items.Clear();

            this.lbAttribs.Tag = classname;

            this.lbAttribs.Items.AddRange(attribs.ToArray());
            this.lbAttribs.Sorted = true;

            //CurrentAttributesRowIndex = 0;
        }
Esempio n. 2
0
        public void ShowTree(CALLING_CONTROL whoCalled, QueryControl mustQuery, string entryPoint = null, string dcName = null, ForestInfo fiH = null)
        {
            bool mustreload = false;

            Caller = whoCalled;

            if (entryPoint != null)
            {
                mustreload = FindNode(entryPoint);
            }

            if (QueryCtrl.ShowDeleted != mustQuery.ShowDeleted)
            {
                mustreload = true;
            }
            QueryCtrl.ShowDeleted = mustQuery.ShowDeleted;

            if (QueryCtrl.ShowRecycled != mustQuery.ShowRecycled)
            {
                mustreload = true;
            }
            QueryCtrl.ShowRecycled = mustQuery.ShowRecycled;

            if (QueryCtrl.Port != mustQuery.Port)
            {
                mustreload = true;
            }
            QueryCtrl.Port = mustQuery.Port;

            if (dcName != null)
            {
                DC = dcName;
            }

            if (fiH != null)
            {
                ThisForestInfo = fiH;
            }

            TreeNode parent = null;

            if (mustreload)
            {
                ADObjectInfo oinfo = new ADObjectInfo()
                {
                    Name = entryPoint, Path = entryPoint, ObjectClass = "nc"
                };
                mustreload = AddEntry(ref parent, oinfo);
            }

            this.Show();

            if (mustreload)
            {
                ExpandNode(parent);
            }

            this.tvLdap.Sort();
        }
        public static void CallBrowser(ref LDAPBrowser lDP, LDAPBrowser.CALLING_CONTROL whoCalled, QueryControl mustQuery, string entryPoint, string dcName, ForestInfo fiH)
        {
            if (lDP == null)
            {
                lDP = new LDAPBrowser(whoCalled, mustQuery, entryPoint, dcName, fiH);
            }

            else if (lDP.IsDisposed)
            {
                lDP = new LDAPBrowser(whoCalled, mustQuery, entryPoint, dcName, fiH);
            }

            else
            {
                lDP.ShowTree(whoCalled, mustQuery, entryPoint, dcName, fiH);
            }
        }
Esempio n. 4
0
        public LDAPBrowser(CALLING_CONTROL whoCalled, QueryControl mustQuery, string entryPoint, string dcName, ForestInfo fiH)
        {
            InitializeComponent();

            LoadInternal(whoCalled, mustQuery, entryPoint, dcName, fiH);
        }
Esempio n. 5
0
 private void LoadInternal(CALLING_CONTROL whoCalled, QueryControl mustQuery, string entryPoint, string dcName, ForestInfo fiH)
 {
     ShowTree(whoCalled, mustQuery, entryPoint, dcName, fiH);
 }