Beispiel #1
0
        private void _DisplayProfilesForServer(TreeListNode tlnServer, int iType)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;

                // begin update
                tlcProfile.BeginUpdate();

                // remove all old items
                tlcProfile.Nodes.Clear();

                // toggle Buttons
                tbbApplicationProfile.Pushed = iType == 0;
                tbbDriverProfile.Pushed      = iType == 1;
                tbbMachineType.Pushed        = iType == 2;

                // assign to membervariable
                m_tlnServer = tlnServer;

                // a server is selected ???
                if (tlnServer != null)
                {
                    NodeData nd = tlnServer.Tag as NodeData;

                    if (nd.Type == NodeType.Server)
                    {
                        switch (iType)
                        {
                        case 0:
                            _InsertProfiles(NodeType.AppProfile, nd.Data2, nd.Data1);
                            break;

                        case 1:
                            _InsertProfiles(NodeType.DrvProfile, nd.Data2, nd.Data1);
                            break;

                        case 2:
                            _InsertProfiles(NodeType.MacType, nd.Data2, nd.Data1);
                            break;
                        }

                        // start JobQueueThread
                        _InitializeJobQueueThread();
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionDialog.Show(this.ParentForm, ex);
            }
            finally
            {
                // end treeupdate
                tlcProfile.EndUpdate();

                Cursor.Current = Cursors.Default;
            }
        }
Beispiel #2
0
        private void _InsertCLRootNode(  )
        {
            TreeListNode tlnRoot;

            ISqlFormatter isql = clsMain.Instance.CurrentConnection.Connection.SqlFormatter;
            SqlExecutor   cSQL = clsMain.Instance.CurrentConnection.Connection.CreateSqlExecutor(clsMain.Instance.CurrentConnection.PublicKey);

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                _GetCentralLibrary();

                // begin treeupdate
                tlcProfile.BeginUpdate();

                // remove all old items
                tlcProfile.Nodes.Clear();

                // Query for FDS
                string strIdentFDS = m_dbCentralLibrary == null ? "" : m_dbCentralLibrary.GetValue("Ident_Domain").String;

                // create a new rootnode
                tlnRoot     = tlcProfile.Nodes.Add(LanguageManager.Instance.FormatString("frmFDSProfileOnServer_CLRoot", strIdentFDS), 0);
                tlnRoot.Tag = new NodeData(NodeType.Root, strIdentFDS, "");

                // insert static subitems of CL domain
                _PrepareFDSDomainNode(tlnRoot);

                // expand our rootnode
                tlnRoot.Expand(false);

                tlcProfile.SelectedNode = tlnRoot;
            }
            catch (Exception ex)
            {
                ExceptionDialog.Show(this.ParentForm, ex);
            }
            finally
            {
                // end treeupdate
                tlcProfile.EndUpdate();

                Cursor.Current = Cursors.Default;
            }
        }
        private void _InsertDomainRootNode(  )
        {
            TreeListNode tlnRoot;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                // begin treeupdate
                tlcProfile.BeginUpdate();

                // remove all old items
                tlcProfile.Nodes.Clear();

                // create a new rootnode
                tlnRoot     = tlcProfile.Nodes.Add(LanguageManager.Instance["frmProfileOnServer_ProfileRoot"], 0);
                tlnRoot.Tag = new NodeData(NodeType.Root, "", "");

                // appand the JobChains
                _InsertDomains(tlnRoot, "");

                // expand our rootnode
                tlnRoot.Expand(false);

                tlcProfile.SelectedNode = tlnRoot;
            }
            catch (Exception ex)
            {
                ExceptionDialog.Show(this.ParentForm, ex);
            }
            finally
            {
                // end treeupdate
                tlcProfile.EndUpdate();

                Cursor.Current = Cursors.Default;
            }
        }
        private void _DisplayServerForProfile(TreeListNode tlnProfile)
        {
            try
            {
                // lock controlupdate
                tlcServer.BeginUpdate();

                // remove all items from this list
                tlcServer.Nodes.Clear();

                m_tlnProfile = tlnProfile;

                if (tlnProfile != null)
                {
                    NodeData nd = tlnProfile.Tag as NodeData;

                    if ((nd.Type == NodeType.AppProfile) ||
                        (nd.Type == NodeType.DrvProfile) ||
                        (nd.Type == NodeType.MacType))
                    {
                        // now load the collection
                        ObjectBaseHash colServer = _GetServerCollection(nd.Data1, nd.Data2, nd.Type);

                        // now insert in tree
                        _InsertServerInTree(null, colServer);

                        // start JobQueueThread
                        _InitializeJobQueueThread();
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionDialog.Show(this.ParentForm, ex);
            }
            finally
            {
                // release controlupdatelock
                tlcServer.EndUpdate();
            }
        }