public frmIgnoreComputerGroups(clsConfig cfgobject)
        {
            cfg = cfgobject;
            wsus = cfg.wsus;

            InitializeComponent();
        }
예제 #2
0
        public frmSUSWatch()
        {
            InitializeComponent();

            wsus = cfg.wsus;

            // Populate duplicated SUS ID grid from XML
            foreach (string susid in cfg.DefaultSusIDCollection)
            {
                DataGridViewRow r = grdSUSID.Rows[grdSUSID.Rows.Add()];

                r.Cells[susID.Index].Value = susid;
                r.Cells[susSource.Index].Value = "Previously Saved";
            }

            // Refresh display
            this.Refresh();

            // Get list of current computers
            ComputerTargetScope s = new ComputerTargetScope();
            s.IncludeDownstreamComputerTargets = true;

            ComputerTargetCollection cc = wsus.server.GetComputerTargets(s);

            // Add all existing computers to our array
            int count = 0;

            foreach (IComputerTarget c in cc)
            {
                ctc.Add(c);
                count++;
            }

            Log("Added " + count.ToString() + " computers already in database");
        }
예제 #3
0
        public frmIgnoreComputerGroups(clsConfig cfgobject)
        {
            cfg  = cfgobject;
            wsus = cfg.wsus;

            InitializeComponent();
        }
        public frmComputerGroupRules(clsConfig cfgobject)
        {
            InitializeComponent();

            // Set Priority column as an integer
            rxPriority.ValueType = typeof(int);

            cfg = cfgobject;
            wsus = cfg.wsus;
        }
예제 #5
0
        public frmMain()
        {
            InitializeComponent();

            // Initialise variables
            wsus = cfg.wsus;

            // Build collection of groups to show
            RebuildShowGroupsCollection();
        }
        public frmComputerGroupRules(clsConfig cfgobject)
        {
            InitializeComponent();

            // Set Priority column as an integer
            rxPriority.ValueType = typeof(int);

            cfg  = cfgobject;
            wsus = cfg.wsus;
        }
예제 #7
0
        public clsConfig()
        {
            // Open the configuration storage registry
            reg = Registry.CurrentUser.OpenSubKey(regPath, true);

            if (reg == null)
                // If the registry key doesn't already exist, create it.
                reg = Registry.CurrentUser.CreateSubKey(regPath);

            wsus = new clsWSUS(this);
        }
        public frmGroupUpdateRules(clsConfig cfgobject, clsWSUS wsusobject)
        {
            // Let the user know something is happening
            Cursor.Current = Cursors.WaitCursor;

            InitializeComponent();

            cfg  = cfgobject;
            wsus = wsusobject;

            // Get list of computer groups and sort it.
            gc         = wsus.ComputerGroups;
            groupnames = new List <string>();

            foreach (IComputerTargetGroup tg in gc)
            {
                groupnames.Add(tg.Name);
            }

            groupnames.Sort();

            // Read existing group rules
            grouprules = cfg.GroupUpdateRules;

            // Update treeview with existing rules
            UpdateGroupUpdateRules();

            // Set default display order (maximum + 1)
            numDisplayOrder.Value = grouprules.MaxDisplayOrder + 1;

            // Set this window to be marginly less wide than the current monitor
            Rectangle scr = Screen.FromControl(this).Bounds;

            // Make this window 20 pixels narrower than the current screen and centre it
            this.Left  = 10;
            this.Width = scr.Width - 20;

            // Note the current height of the form - this will be the minimum height of the form
            minheight = this.Height;

            // Finished - reset cursor to normal
            Cursor.Current = Cursors.Arrow;
        }
        public frmGroupUpdateRules(clsConfig cfgobject, clsWSUS wsusobject)
        {
            // Let the user know something is happening
            Cursor.Current = Cursors.WaitCursor;

            InitializeComponent();

            cfg = cfgobject;
            wsus = wsusobject;

            // Get list of computer groups and sort it.
            gc = wsus.ComputerGroups;
            groupnames = new List<string>();

            foreach (IComputerTargetGroup tg in gc) groupnames.Add(tg.Name);

            groupnames.Sort();

            // Read existing group rules
            grouprules = cfg.GroupUpdateRules;

            // Update treeview with existing rules
            UpdateGroupUpdateRules();

            // Set default display order (maximum + 1)
            numDisplayOrder.Value = grouprules.MaxDisplayOrder + 1;

            // Set this window to be marginly less wide than the current monitor
            Rectangle scr = Screen.FromControl(this).Bounds;

            // Make this window 20 pixels narrower than the current screen and centre it
            this.Left = 10;
            this.Width = scr.Width - 20;

            // Note the current height of the form - this will be the minimum height of the form
            minheight = this.Height;

            // Finished - reset cursor to normal
            Cursor.Current = Cursors.Arrow;
        }
예제 #10
0
            public void SetWSUSObject(clsWSUS wsusobject)
            {
                // Store the object for further use
                wsus = wsusobject;

                // Did we store any GUIDs for later update?
                if (_storedgroupguid != null)
                    // Re-set variable
                    computergroupid = _storedgroupguid;

                if (_storedparentguid != null)
                    // Re-set variable
                    parentcomputergroupid = _storedparentguid;
            }
예제 #11
0
 // This constructor is private so that we can serialize and and deserialize properly without exposing it for use within code
 private GroupUpdateRule()
 {
     // Since no wsus object has been passed, null the wsus object so that GUIDs will be stored and loaded later
     wsus = null;
 }
예제 #12
0
 public GroupUpdateRule(clsWSUS wsusobject)
 {
     wsus = wsusobject;
 }