Пример #1
0
        private void userNameTextBox_TextChanged(object sender, EventArgs e)
        {
            var _userName = userNameTextBox;

            if (_model.GetUserName(new NullProgress()) != _userName.Text.Trim() && _userName.Text.Trim().Length > 0)
            {
                _model.SetUserName(_userName.Text.Trim(), new NullProgress());
            }
        }
Пример #2
0
        protected override void OnLoad(System.EventArgs e)
        {
            _didLoad = true;            // trying to track down WS-14977
            base.OnLoad(e);
            if (_model == null)
            {
                return;
            }

            _userName.Text          = _model.GetUserName(_progress);
            _repositoryAliases.Text = _model.GetAddresses();
        }
Пример #3
0
        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;
        }
Пример #4
0
        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;
        }