예제 #1
0
        public void DeselectEntry()
        {
            _activeEntrySet = false;
            var noEntrySelectedControl = new DatabaseViewEntryNone();

            panelEntryDetailsContainer.Controls.Clear();
            panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);
        }
예제 #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();
        }
예제 #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);
        }
예제 #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);
        }
예제 #5
0
 public void DeselectEntry()
 {
     _activeEntrySet = false;
     var noEntrySelectedControl = new DatabaseViewEntryNone();
     panelEntryDetailsContainer.Controls.Clear();
     panelEntryDetailsContainer.Controls.Add(noEntrySelectedControl);
 }
예제 #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();
        }