Пример #1
0
        public void CreateControls(bool serverName, FileGroup fileGroup)
        {
            int tabIndex = 0;
            int rowIndex = 0;

            if (serverName)
            {
                ServerNameTextBox         = FormTools.AddLabeledTextBox(this, "·þÎñÆ÷Ãû:", ref rowIndex, ref tabIndex);
                ServerNameTextBox.Enabled = true;
            }
            _credentialsUI = new CredentialsUI(base.InheritanceControl);
            _credentialsUI.AddControlsToParent(this, LogonCredentialsDialogOptions.ShowProfiles, ref rowIndex, ref tabIndex);
            _credentialsUI.PopulateCredentialsProfiles(fileGroup);
        }
Пример #2
0
        protected void AddGroupName(ref int rowIndex, ref int tabIndex)
        {
            TSettingsGroup settings = base.Settings;

            _groupNameTextBox          = FormTools.AddLabeledTextBox(this, "组名:", settings.GroupName, ref rowIndex, ref tabIndex);
            _groupNameTextBox.Enabled  = true;
            _groupNameTextBox.Validate = delegate
            {
                _groupNameTextBox.Text = _groupNameTextBox.Text.Trim();
                string text = _groupNameTextBox.Text;
                if (text.Length == 0)
                {
                    return("请输入组名");
                }
                string pathSeparator = ServerTree.Instance.PathSeparator;
                return((text.IndexOf(pathSeparator) != -1) ? ("组名可能不包含路径分隔符 \"" + pathSeparator + "\"") : null);
            };
            base.FocusControl = _groupNameTextBox;
        }