示例#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();
        }