private void LoadRecord() { #region Manager List flpManagers.Controls.Clear(); foreach (KeyValuePair <string, bool> kvp in _Store.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 _Store.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 _Store.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 (!_Store.IAmManager) { flpManagers.Enabled = flpUsers.Enabled = flpReaders.Enabled = toolbar.Enabled = false; } flpManagers.Enabled = _Store.IAmAdmin; }