Esempio n. 1
0
        public void DeselectEntry()
        {
            _activeEntrySet = false;
            var noEntrySelectedControl = new DatabaseViewEntryNone();

            panelEntryDetailsContainer.Controls.Clear();
            panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);
        }
Esempio n. 2
0
        private void SetActiveGroup(int databaseGroupId)
        {
            if (databaseGroupId == _activeGroupId)
            {
                return;
            }

            _activeGroupId = databaseGroupId;

            var noEntrySelectedControl = new DatabaseViewEntryNone();

            panelEntryDetailsContainer.Controls.Clear();
            panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);

            foreach (var control in panelGroupsContainer.Controls)
            {
                var groupControl = (DatabaseViewGroup)control;
                groupControl.Selected = groupControl.DatabaseGroupId == _activeGroupId;
            }

            UpdateControl();
        }
Esempio n. 3
0
        private void SetActiveEntry(int databaseEntryId)
        {
            if (_activeEntrySet && databaseEntryId == _activeEntryId)
            {
                _activeEntrySet = false;
                var noEntrySelectedControl = new DatabaseViewEntryNone();
                panelEntryDetailsContainer.Controls.Clear();
                panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);
                return;
            }

            _activeEntrySet = true;
            _activeEntryId  = databaseEntryId;

            var control = new DatabaseViewEntryWebsite(_controller, this)
            {
                Dock = DockStyle.Fill
            };

            control.SetExistingEntry(databaseEntryId);

            panelEntryDetailsContainer.Controls.Clear();
            panelEntryDetailsContainer.Controls.Add(control);
        }
Esempio n. 4
0
        private void SetActiveEntry(int databaseEntryId)
        {
            if (_activeEntrySet && databaseEntryId == _activeEntryId)
            {
                _activeEntrySet = false;
                var noEntrySelectedControl = new DatabaseViewEntryNone();
                panelEntryDetailsContainer.Controls.Clear();
                panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);
                return;
            }

            _activeEntrySet = true;
            _activeEntryId = databaseEntryId;

            var control = new DatabaseViewEntryWebsite(_controller, this) {Dock = DockStyle.Fill};
            control.SetExistingEntry(databaseEntryId);

            panelEntryDetailsContainer.Controls.Clear();
            panelEntryDetailsContainer.Controls.Add(control);
        }
Esempio n. 5
0
 public void DeselectEntry()
 {
     _activeEntrySet = false;
     var noEntrySelectedControl = new DatabaseViewEntryNone();
     panelEntryDetailsContainer.Controls.Clear();
     panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);
 }
Esempio n. 6
0
        private void SetActiveGroup(int databaseGroupId)
        {
            if (databaseGroupId == _activeGroupId)
                return;

            _activeGroupId = databaseGroupId;
            
            var noEntrySelectedControl = new DatabaseViewEntryNone();
            panelEntryDetailsContainer.Controls.Clear();
            panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);

            foreach (var control in panelGroupsContainer.Controls)
            {
                var groupControl = (DatabaseViewGroup) control;
                groupControl.Selected = groupControl.DatabaseGroupId == _activeGroupId;
            }
            
            UpdateControl();
        }