コード例 #1
0
 /// <summary>
 ///     Foreign address for use when sending a letter abroad.
 /// </summary>
 /// <param name="countryIdentifier">Type of identifier used for identifying a country.</param>
 /// <param name="countryIdentifierValue">The value for country.</param>
 /// <param name="addressLine1">First address line.</param>
 /// <param name="addressLine2">Second address line.</param>
 /// <param name="addressLine3">Third address line.</param>
 /// <param name="addressline4">Fourth address line.</param>
 public ForeignAddress(CountryIdentifier countryIdentifier, string countryIdentifierValue,
                       string addressLine1, string addressLine2 = null, string addressLine3 = null, string addressline4 = null)
     : base(addressLine1, addressLine2, addressLine3)
 {
     Addressline4           = addressline4;
     CountryIdentifier      = countryIdentifier;
     CountryIdentifierValue = countryIdentifierValue;
 }
コード例 #2
0
 public void SetAutoConnectToCountry(CountryIdentifier country)
 {
     PersistedSettingsExtension.Save <UserSettings>(this._settings, delegate(UserSettings s)
     {
         s.set_AutoConnectMode("country");
         s.set_AutoConnectTarget(country.get_Code());
     });
     this.RaiseAutoConnectTargetChanged();
 }
コード例 #3
0
ファイル: CountryManager.cs プロジェクト: aco228/MobiChat
        public Country Load(IConnectionInfo connection, string value, CountryIdentifier identifier)
        {
            ISqlConnectionInfo sqlConnection = connection as ISqlConnectionInfo;

            if (sqlConnection != null)
            {
                return(this.Load(sqlConnection, value, identifier));
            }
            using (sqlConnection = new SqlConnectionInfo(connection, this.Type))
                return(this.Load(sqlConnection, value, identifier));
        }
コード例 #4
0
        public static ItemChoiceType2 ToCountryIdentifier(this CountryIdentifier countryIdentifier)
        {
            switch (countryIdentifier)
            {
            case CountryIdentifier.Country:
                return(ItemChoiceType2.country);

            case CountryIdentifier.Countrycode:
                return(ItemChoiceType2.countrycode);

            default:
                throw new ArgumentOutOfRangeException(nameof(countryIdentifier), countryIdentifier, null);
            }
        }
コード例 #5
0
ファイル: CountryManager.cs プロジェクト: aco228/MobiChat
        public Country Load(ISqlConnectionInfo connection, string value, CountryIdentifier identifier)
        {
            SqlQueryParameters parameters = new SqlQueryParameters();
            string             parameter  = string.Empty;

            switch (identifier)
            {
            case CountryIdentifier.GlobalName:
                parameter = "GlobalName";
                break;

            case CountryIdentifier.LocalName:
                parameter = "LocalName";
                break;

            case CountryIdentifier.CountryCode:
                parameter = "CountryCode";
                break;

            case CountryIdentifier.CultureCode:
                parameter = "CultureCode";
                break;

            case CountryIdentifier.TwoLetterIsoCode:
                parameter = "TwoLetterIsoCode";
                break;

            default:
                parameter = "GlobalName";
                break;
            }

            parameters.Where = string.Format("[c].{0} = @{0}", parameter);
            parameters.Arguments.Add(parameter, value);
            return(this.Load(connection, parameters));
        }
コード例 #6
0
 public ServersByCountryViewModel(CountryIdentifier country, IEnumerable <ServerItemViewModel> servers)
 {
     this.< Country > k__BackingField = country;
     base.Servers.AddRange(servers);
 }
コード例 #7
0
ファイル: CountryManager.cs プロジェクト: aco228/MobiChat
 public Country Load(string value, CountryIdentifier identifier)
 {
     using (SqlConnectionInfo connection = new SqlConnectionInfo(this.Type))
         return(this.Load(connection, value, identifier));
 }