Beispiel #1
0
        private void LoadGeneralSetting(bool isLaunch)
        {
            var readCsv        = new ReadAndWriteCsv("GeneralSetting.csv");
            var generalSetting = readCsv.GetCsvRecords <GeneralSetting>(readCsv.LoadCsv <GeneralSettingMap>()).ToList();

            if (generalSetting.Count == 0)
            {
                return;
            }

            _generalSetting.LanguageCode = generalSetting[0].LanguageCode;
            if (isLaunch)
            {
                return;
            }

            _generalSetting.IsDoNotConfirmationIfAllRecipientsAreSameDomain = generalSetting[0].IsDoNotConfirmationIfAllRecipientsAreSameDomain;
            _generalSetting.IsDoDoNotConfirmationIfAllWhite          = generalSetting[0].IsDoDoNotConfirmationIfAllWhite;
            _generalSetting.IsAutoCheckIfAllRecipientsAreSameDomain  = generalSetting[0].IsAutoCheckIfAllRecipientsAreSameDomain;
            _generalSetting.IsShowConfirmationToMultipleDomain       = generalSetting[0].IsShowConfirmationToMultipleDomain;
            _generalSetting.EnableGetContactGroupMembers             = generalSetting[0].EnableGetContactGroupMembers;
            _generalSetting.EnableGetExchangeDistributionListMembers = generalSetting[0].EnableGetExchangeDistributionListMembers;
            _generalSetting.ContactGroupMembersAreWhite                  = generalSetting[0].ContactGroupMembersAreWhite;
            _generalSetting.ExchangeDistributionListMembersAreWhite      = generalSetting[0].ExchangeDistributionListMembersAreWhite;
            _generalSetting.IsNotTreatedAsAttachmentsAtHtmlEmbeddedFiles = generalSetting[0].IsNotTreatedAsAttachmentsAtHtmlEmbeddedFiles;
        }
Beispiel #2
0
        private void LoadSetting()
        {
            var generalSetting = new List <GeneralSetting>();
            var readCsv        = new ReadAndWriteCsv("GeneralSetting.csv");

            foreach (var data in readCsv.GetCsvRecords <GeneralSetting>(readCsv.LoadCsv <GeneralSettingMap>()))
            {
                generalSetting.Add((data));
            }

            if (generalSetting.Count == 0)
            {
                return;
            }

            _language = generalSetting[0].LanguageCode;
            _isDoNotConfirmationIfAllRecipientsAreSameDomain = generalSetting[0].IsDoNotConfirmationIfAllRecipientsAreSameDomain;
            _isDoDoNotConfirmationIfAllWhite         = generalSetting[0].IsDoDoNotConfirmationIfAllWhite;
            _isAutoCheckIfAllRecipientsAreSameDomain = generalSetting[0].IsAutoCheckIfAllRecipientsAreSameDomain;
            _isShowConfirmationToMultipleDomain      = generalSetting[0].IsShowConfirmationToMultipleDomain;
        }