private void _Load(VI.Controls.Interfaces.ITreeListControl treeList, bool loadApps)
        {
            ITreeListProxy proxy = treeList.Proxy;

            using (new UpdateHelper(treeList))
            {
                proxy.Clear();

                // Daten holen und prüfen
                ISingleDbObject dbobject = m_MainActivator.DbObject;

                if (dbobject == null)
                {
                    return;
                }

                IColDbObject col = Connection.CreateCol("MachineAppsInfo");
                col.Prototype["displayname"].IsDisplayItem          = true;
                col.Prototype["CurrentlyActive"].IsDisplayItem      = true;
                col.Prototype["Installdate"].IsDisplayItem          = true;
                col.Prototype["deinstalldate"].IsDisplayItem        = true;
                col.Prototype["revision"].IsDisplayItem             = true;
                col.Prototype["UID_OS"].IsDisplayItem               = true;
                col.Prototype["UID_InstallationType"].IsDisplayItem = true;

                col.Prototype.WhereClause = SqlFormatter.AndRelation(!FormTool.CanSee(dbobject, "UID_HardWare") ? "1=2" :
                                                                     SqlFormatter.UidComparison("UID_Hardware", dbobject["UID_HardWare"].New.String),
                                                                     SqlFormatter.Comparison("AppsNotDriver", loadApps, ValType.Bool));
                col.Prototype.OrderBy = "Displayname, Installdate, DeInstallDate";
                col.Load(CollectionLoadType.ForeignDisplays);

                foreach (IColElem elem in col)
                {
                    ITreeListNode      node = proxy.AddNode(elem.GetDisplayValue("displayname"), (int)VI.ImageLibrary.StockImage.ApplicationProfile);
                    ITreeListItemSmall item = proxy.CreateCheckBoxItem(elem.GetValue("CurrentlyActive").Bool);
                    item.Enabled = false;
                    proxy.AddItem(node, item);

                    DateTime date = elem.GetValue("Installdate").Date;
                    item      = proxy.AddItem(node, DbVal.IsEmpty(date, ValType.Date) ? "" : date.ToString());
                    item.Data = date;

                    date      = elem.GetValue("deinstalldate").Date;
                    item      = proxy.AddItem(node, DbVal.IsEmpty(date, ValType.Date) ? "" : date.ToString());
                    item.Data = date;

                    item      = proxy.AddItem(node, elem["Revision"]);
                    item.Data = elem.GetValue("Revision").Int;

                    proxy.AddItem(node, elem.GetDisplayValue("UID_OS"));
                    proxy.AddItem(node, elem.GetDisplayValue("UID_InstallationType"));
                }
            }
        }
        private void _LoadProtocols()
        {
            ITreeListProxy proxy = m_TreeListProtocols.Proxy;

            using (new UpdateHelper(m_TreeListProtocols))
            {
                proxy.Clear();

                // Daten holen und prüfen
                ISingleDbObject dbobject = m_MainActivator.DbObject;

                if (dbobject == null)
                {
                    return;
                }

                IColDbObject col = Connection.CreateCol("ADSAccountAppsInfo");
                col.Prototype["displayname"].IsDisplayItem          = true;
                col.Prototype["CurrentlyActive"].IsDisplayItem      = true;
                col.Prototype["Installdate"].IsDisplayItem          = true;
                col.Prototype["deinstalldate"].IsDisplayItem        = true;
                col.Prototype["revision"].IsDisplayItem             = true;
                col.Prototype["UID_OS"].IsDisplayItem               = true;
                col.Prototype["UID_InstallationType"].IsDisplayItem = true;

                col.Prototype.WhereClause = !FormTool.CanSee(dbobject, "UID_ADSAccount") ? "1=2" :
                                            SqlFormatter.UidComparison("UID_ADSAccount", FormTool.GetValueSafe(dbobject, "UID_ADSAccount", ""));
                col.Prototype.OrderBy = "displayname";
                col.Load(CollectionLoadType.ForeignDisplays);

                foreach (IColElem elem in col)
                {
                    ITreeListNode      node = proxy.AddNode(elem.GetDisplayValue("displayname"), (int)VI.ImageLibrary.StockImage.ApplicationProfile);
                    ITreeListItemSmall item = proxy.CreateCheckBoxItem(elem.GetValue("CurrentlyActive").Bool);
                    item.Enabled = false;
                    proxy.AddItem(node, item);
                    proxy.AddItem(node, elem["Installdate"]);
                    proxy.AddItem(node, elem["deinstalldate"]);
                    proxy.AddItem(node, elem["Revision"]);
                    proxy.AddItem(node, elem.GetDisplayValue("UID_OS"));
                    proxy.AddItem(node, elem.GetDisplayValue("UID_InstallationType"));
                }
            }
        }
        /// <summary>
        /// Diese Methode wird während der Initialisierung des Customizers
        /// aufgerufen und ermöglicht eine vom Customizer abhängige Initialisierung.
        /// </summary>
        protected override void OnInit()
        {
            // Basis aufrufen, um den Event zu feuern
            base.OnInit();

            try
            {
                // Zuweisung der generierten Steuerelemente und Komponenten
                // zu ihren Instanzvariablen
                #region Component definition (Do not remove or rename this region!)

                m_MainActivator = (VI.Controls.ActivatorComponent)Form.Components["MainActivator"];
                m_MainPanel     = (VI.Controls.Interfaces.IVIPanel)Form.Controls["MainPanel"];
                m_TreeList      = (VI.Controls.Interfaces.ITreeListControl)Form.Controls["TreeList"];

                #endregion Component definition

                m_Proxy = m_TreeList.Proxy;

                m_Proxy.AddColumn("~DisplayName", 300);
                m_Proxy.AddColumn("~ProfileStateProduction", 130);
                m_Proxy.AddColumn("~ProfileStateShadow", 130);
                m_Proxy.AddColumn("~ChgNumber", 100);

                m_TreeList.ImageList = ImagelistHandler.StockImageListSmall;

                if (AppData.Instance.AppType == AppType.Web)
                {
                    CommonTools.SetProperty(m_TreeList, "AlternateNodeBackground", true);
                    CommonTools.SetProperty(m_TreeList, "AutoSize", true);
                    CommonTools.SetProperty(m_TreeList, "ShowNodeImages", false);
                }

                // Design der Alien-Controls anpassen
                OnControlDesignChanged();
            }
            catch (Exception ex)
            {
                // Fehler melden
                throw new FormCustomizerException(874825, ex, ToString());
            }
        }