public ServerSettings(ConfigContainer.Config config) { InitializeComponent(); this.config = config; textBoxIP.Text = config.DBIP; textBoxName.Text = config.DBUser; textBoxPassword.Text = config.DBPassword; numericUpDownPort.Value = config.ServerPort; }
public Server() { InitializeComponent(); config = ConfigContainer.GetConfig(); checkBoxAllowRegister.Checked = config.AllowRegistrationRequests; checkBoxAllowStudRegister.Checked = config.AllowStudentsRegistration; checkBoxAllowTeachRegister.Checked = config.AllowTeacherRegistration; checkBoxAllowSubjectAdd.Checked = config.AllowSubjectsAdding; checkBoxAllowGroupAdd.Checked = config.AllowGroupsAdding; }