private void validateKey()
        {
            // Log messages and update the Form's valid state depending on whether the provided S3 key is valid
            string error;
            bool   valid = ValidateS3.Key(TxtKey.Text, out error);

            ErrorMain.SetError(TxtKey, error);
            cvStartUpload.MarkValidity(TxtKey, valid);
        }
Exemple #2
0
        private void validateSecretKey()
        {
            // Log messages and update the Form's valid state depending on whether the provided S3 key is valid
            string error = "";
            bool   valid = ValidateProfile.SecretKey(TxtSecretAccessKey.Text, out error);

            ErrorMain.SetError(TxtSecretAccessKey, error);
            cvSave.MarkValidity(TxtSecretAccessKey, valid);
        }
Exemple #3
0
        private void validateName()
        {
            // Log messages and update the Form's valid state depending on whether the provided S3 key is valid
            string error = "";
            bool   valid = ValidateProfile.Name(TxtProfileName.Text, out error);

            ErrorMain.SetError(TxtProfileName, error);
            cvSave.MarkValidity(TxtProfileName, valid);
        }
        private void resetBuckets(List <S3Bucket> buckets = null)
        {
            bool valid = buckets?.Count > 0;

            ComboBuckets.DisplayMember = nameof(S3Bucket.BucketName);
            ComboBuckets.DataSource    = buckets;

            LblBucket.Enabled    = valid;
            ComboBuckets.Enabled = valid;

            string error = (valid ? "" : MissingS3Bucket);

            ErrorMain.SetError(ComboBuckets, error);

            cvStartUpload.MarkValidity(ComboBuckets, valid);
        }
        private void resetRegions(RegionEndpoint[] regions = null)
        {
            bool valid = regions?.Length > 0;

            ComboRegions.DisplayMember = nameof(RegionEndpoint.DisplayName);
            ComboRegions.SelectedIndex = -1;
            ComboRegions.DataSource    = regions;

            LblRegion.Enabled    = valid;
            ComboRegions.Enabled = valid;

            string error = (valid ? "" : MissingRegion);

            ErrorMain.SetError(ComboRegions, error);

            cvStartUpload.MarkValidity(ComboRegions, valid);
        }
        private void resetProfiles(ProfileSettingsBase[] profiles = null)
        {
            bool valid = profiles?.Length > 0;

            ComboProfiles.DisplayMember = nameof(ProfileSettingsBase.Name);
            ComboProfiles.DataSource    = profiles;

            LblProfile.Enabled       = valid;
            ComboProfiles.Enabled    = valid;
            BtnEditProfile.Enabled   = valid;
            BtnDeleteProfile.Enabled = valid;

            string error = (valid ? "" : MissingProfile);

            ErrorMain.SetError(ComboProfiles, error);

            cvStartUpload.MarkValidity(ComboProfiles, valid);
        }