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