/// <summary>
        /// Display the data for this tab where we have selected an 'All Assets' node or child node thereof
        /// </summary>
        /// <param name="displayedNode"></param>
        protected void DisplayForAllAssets(UltraTreeNode displayedNode, TreeSelectionEventArgs.ITEMTYPE itemType)
        {
            // Ok we are displaying data for a node beneath 'All Assets' however this still means that we could
            // be displaying one of
            //
            //	All Publishers
            //	Applications for a Publisher
            //	Assets for an Application
            //	Operating System Family
            //
            if (itemType == TreeSelectionEventArgs.ITEMTYPE.asset_applications)
            {
                DisplayAllAssets_Applications(displayedNode);
            }

            else if (itemType == TreeSelectionEventArgs.ITEMTYPE.asset_publisher)
            {
                DisplayAllAssets_Publisher(displayedNode);
            }

            else if (itemType == TreeSelectionEventArgs.ITEMTYPE.asset_application)
            {
                DisplayAllAssets_Application(displayedNode);
            }

            else if (itemType == TreeSelectionEventArgs.ITEMTYPE.asset_os)
            {
                DisplayAllAssets_OS(displayedNode);
            }
        }
        /// <summary>
        /// this is the main display function called to display expanded information pertaining to the specified
        /// group.  We need to display the sub-groups and assets within this group
        /// </summary>
        /// <param name="group"></param>
        public void Show(UltraTreeNode displayedNode, TreeSelectionEventArgs.ITEMTYPE itemType)
        {
            _displayedNode = displayedNode;
            _itemType      = itemType;

            // Initialize the tab view
            InitializeTabView();

            // ...and add in the child groups and children
            tabView.Display(displayedNode, itemType);
        }
Пример #3
0
        /// <summary>
        /// Controls the information that is displayed for a computer.
        /// </summary>
        /// <param name="computerName">Name of the computer to display.</param>
        public void Show(UltraTreeNode displayedNode, TreeSelectionEventArgs.ITEMTYPE itemType)
        {
            // Clear the existing data
            InitializeTabView();

            // Save data passed in to us
            _displayedNode = displayedNode;
            _itemType      = itemType;

            // ...and add in the child groups and children
            tabView.Display(displayedNode, itemType);
        }
        /// <summary>
        /// This function is called from our _presenter to cause the applications for the specified asset or 'All Assets'
        /// branch to be displayed.  We are passed the UltraTreeNode which identifies the parent for which we are
        /// displaying children
        /// </summary>
        /// <param name="displayedNode"></param>
        public void Display(UltraTreeNode displayedNode, TreeSelectionEventArgs.ITEMTYPE itemType)
        {
            _displayedNode = displayedNode;
            _itemType      = itemType;

            //	Call BeginUpdate to prevent drawing while we are populating the control
            this.applicationsGridView.BeginUpdate();
            this.Cursor = Cursors.WaitCursor;

            // Delete all entries from the current data set being displayed as we do not know the layout of the data
            // which we will be displaying this time through
            applicationsDataSet.Tables[0].Rows.Clear();
            applicationsDataSet.Tables[0].Columns.Clear();

            // We may be either displaying applications installed for a specific asset or alternatively may be going
            // down the 'All Assets' branch and displaying applications installed for all assets in this branch
            if (displayedNode.Tag is Asset)
            {
                DisplayForAsset(displayedNode);
            }

            else if (displayedNode.Tag is AllAssets)
            {
                DisplayForAllAssets(displayedNode, itemType);
            }

            //	Restore the cursor
            this.Cursor = Cursors.Default;

            // The first column in the grid is ALWAYS hidden
            this.applicationsGridView.DisplayLayout.Bands[0].Columns[0].Hidden = true;

            //try
            //{
            //    UltraGridColumn gridItemColumn = this.applicationsGridView.DisplayLayout.Bands[0].Columns["Publisher"];
            //    gridItemColumn.Width = 200;

            //    gridItemColumn = this.applicationsGridView.DisplayLayout.Bands[0].Columns["Name"];
            //    gridItemColumn.Width = 220;
            //}
            //catch (Exception)
            //{
            //}

            //	Call EndUpdate to resume drawing operations
            this.applicationsGridView.EndUpdate(true);
        }
Пример #5
0
        /// <summary>
        /// Display
        /// =======
        ///
        /// Display the contents of the specified audited data category within this tab view.
        ///
        /// Note that this can take 2 forms - ungrouped or grouped
        ///
        /// Where the item is ungrouped we will display the data in 2 columns which are item and value.  This is used
        /// in the majority of hardware displays where the category is say Hardware>Processor and the displayed values are
        /// say Speed > 2500,  Count > 2 etc.
        ///
        /// This approach does not work for say System > Active Processes as we have multiple values to display for each
        /// active process and do not want the processes themselves displayed in the tree view.  Instead these items are grouped.
        /// What this means is that for say
        ///
        ///		System>Active Processes>SMSS.EXE
        ///		System>Active Processes>IEXPLORE.EXE
        ///
        /// The Tree view will not allow a drill down to SMSS.EXE or IEXPLORE.EXE as they are flagged as grouped.  Instead the
        /// List View will take SMSS.EXE and IEXPLORE.EXE and use these names as the first column in the List View.  The List view
        /// will then determine what values are available for each process by looking at the sub-values - for example for each
        /// Active Process we have Name, Executable and PID.  These are added as columns to the list view and the data is grouped
        /// by the process name.
        ///
        /// </summary>
        /// <param name="displayGroup"></param>
        public void Display(UltraTreeNode displayedNode, TreeSelectionEventArgs.ITEMTYPE itemType)
        {
            // Save the Tree Node being displayed and ensure that it is expanded
            _displayedNode          = displayedNode;
            _displayedNode.Expanded = true;

            //	Call BeginUpdate to prevent drawing while we are populating the control
            this.auditGridView.BeginUpdate();
            this.Cursor = Cursors.WaitCursor;

            // Delete all entries from the current data set being displayed
            auditDataSet.Tables[0].Rows.Clear();
            auditDataSet.Tables[0].Columns.Clear();

            // We may be displaying data here for either a specific node or possible the AllAssets node and the
            // way in which we display the data depends on this so check it now
            if (displayedNode.Tag is FileSystemFolder || itemType == TreeSelectionEventArgs.ITEMTYPE.asset_filesystem)
            {
                DisplayFileSystem(displayedNode);
            }
            else if (displayedNode.Tag is Asset)
            {
                DisplayForAsset(displayedNode);
            }
            else
            {
                DisplayForAllAssets(displayedNode);
            }

            // Hide the DataObject column
            UltraGridColumn gridObjectColumn = this.auditGridView.DisplayLayout.Bands[0].Columns["DataObject"];

            gridObjectColumn.Hidden = true;

            // Make the item column pretty big (if it exists)
            if (this.auditGridView.DisplayLayout.Bands[0].Columns.Exists("item"))
            {
                UltraGridColumn gridItemColumn = this.auditGridView.DisplayLayout.Bands[0].Columns["Item"];
                gridItemColumn.Width = 30;
            }

            //	Restore the cursor
            this.Cursor = Cursors.Default;

            //	Call EndUpdate to resume drawing operations
            this.auditGridView.EndUpdate(true);
        }