コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (defaultRateSchedule_ != null)
            {
                hash ^= DefaultRateSchedule.GetHashCode();
            }
            if (ShowCancellationPolicy != false)
            {
                hash ^= ShowCancellationPolicy.GetHashCode();
            }
            if (RequirePhoneNumber != false)
            {
                hash ^= RequirePhoneNumber.GetHashCode();
            }
            if (CharacterCase != 0)
            {
                hash ^= CharacterCase.GetHashCode();
            }
            if (BlockDropDays != 0)
            {
                hash ^= BlockDropDays.GetHashCode();
            }
            if (ViewFolioHighlightDays != 0)
            {
                hash ^= ViewFolioHighlightDays.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
        private static char GetCasedChar(char c, CharacterCase cc)
        {
            switch (cc)
            {
            case CharacterCase.Lower: return(Char.ToLower(c));

            case CharacterCase.Upper: return(Char.ToUpper(c));
            }
            return(c);
        }
コード例 #3
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="owner">Dono da propriedade.</param>
 /// <param name="propertyName">Nome da propriedade</param>
 public BusinessEntityPropertyState(IStateble owner, string propertyName)
 {
     owner.Require("owner").NotNull();
     propertyName.Require("propertyName").NotNull().NotEmpty();
     _charCase               = CharacterCase.Undefined;
     _owner                  = owner;
     _propertyName           = propertyName;
     _owner.PropertyChanged += OwnerPropertyChanged;
     _otherAttributes        = new Dictionary <string, object>();
     _isConfigured           = false;
 }
コード例 #4
0
        /// <summary>
        /// Changes case for a string content of a button, if it's not null.
        /// </summary>
        private static void ExclusiveCaseChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Button button  = (Button)d;
            string content = button.Content.ToString();

            if (content != null)
            {
                CharacterCase newCase = (CharacterCase)e.NewValue;
                button.Content = newCase == CharacterCase.OnlyUpper ? content.ToUpper() : content.ToLower();
            }
        }
コード例 #5
0
        private static string GetCasedString(string s, CharacterCase cc)
        {
            if (s == null)
            {
                return(null);
            }
            StringBuilder sb = new StringBuilder();

            foreach (char c in s)
            {
                sb.Append(GetCasedChar(c, cc));
            }
            return(sb.ToString());
        }
コード例 #6
0
ファイル: SqlDumper_FmtUtils.cs プロジェクト: dbshell/dbshell
 public static char GetCasedChar(char c, CharacterCase cc)
 {
     switch (cc)
     {
         case CharacterCase.Lower: return Char.ToLower(c);
         case CharacterCase.Upper: return Char.ToUpper(c);
     }
     return c;
 }
コード例 #7
0
ファイル: SqlDumper_FmtUtils.cs プロジェクト: dbshell/dbshell
 public static string GetCasedString(string s, CharacterCase cc)
 {
     if (s == null) return null;
     var sb = new StringBuilder();
     foreach (char c in s) sb.Append(GetCasedChar(c, cc));
     return sb.ToString();
 }
コード例 #8
0
 /// <summary>
 /// Sets CharacterCase value of ExclusiveCase property for the specified button.
 /// </summary>
 /// <param name="button">Button whose ExclusiveCase you're setting.</param>
 /// <param name="value">Character case you wish to set for the ExclusiveCase property.</param>
 public static void SetExclusiveCase(Button button, CharacterCase value)
 {
     button.SetValue(ExclusiveCaseProperty, value);
 }
コード例 #9
0
 /// <summary>
 /// Sets CharacterCase value of ExclusiveCase property for the specified button.
 /// </summary>
 /// <param name="button">Button whose ExclusiveCase you're setting.</param>
 /// <param name="value">Character case you wish to set for the ExclusiveCase property.</param>
 public static void SetExclusiveCase(Button button, CharacterCase value)
 {
     button.SetValue(ExclusiveCaseProperty, value);
 }