private void LoadRecord() { #region Manager List flpManagers.Controls.Clear(); foreach (KeyValuePair <string, bool> kvp in _Application.GetManagers()) { CheckBox chk = new CheckBox() { AutoEllipsis = true, AutoSize = false, Checked = kvp.Value, Margin = new Padding(4, 4, 4, 4), Text = kvp.Key, Width = 180 }; flpManagers.Controls.Add(chk); } #endregion #region User List flpUsers.Controls.Clear(); foreach (KeyValuePair <string, bool> kvp in _Application.GetUsers()) { CheckBox chk = new CheckBox() { AutoEllipsis = true, AutoSize = false, Checked = kvp.Value, Margin = new Padding(4, 4, 4, 4), Text = kvp.Key, Width = 180 }; flpUsers.Controls.Add(chk); } #endregion #region Reader List flpReaders.Controls.Clear(); foreach (KeyValuePair <string, bool> kvp in _Application.GetReaders()) { CheckBox chk = new CheckBox() { AutoEllipsis = true, AutoSize = false, Checked = kvp.Value, Margin = new Padding(4, 4, 4, 4), Text = kvp.Key, Width = 180 }; flpReaders.Controls.Add(chk); } #endregion if (!_Application.IAmManager) { flpManagers.Enabled = flpUsers.Enabled = flpReaders.Enabled = toolbar.Enabled = false; } flpManagers.Enabled = _Application.IAmAdmin; }