public SendReceiveSettings(string repositoryLocation) { InitializeComponent(); RequireThat.Directory(repositoryLocation).Exists(); var repository = HgRepository.CreateOrUseExisting(repositoryLocation, new NullProgress()); _model = new SettingsModel(repository); userNameTextBox.Text = _model.GetUserName(new NullProgress()); _internetModel = new ServerSettingsModel(); _internetModel.InitFromProjectPath(repositoryLocation); _serverSettingsControl.Model = _internetModel; _internetButtonEnabledCheckBox.CheckedChanged += internetCheckChanged; _internetButtonEnabledCheckBox.Checked = Properties.Settings.Default.InternetEnabled; _serverSettingsControl.Enabled = _internetButtonEnabledCheckBox.Checked; _showChorusHubInSendReceive.Checked = Properties.Settings.Default.ShowChorusHubInSendReceive; }
public SettingsView(SettingsModel model) { _model = model; InitializeComponent(); }