Skip to content

Commit

Permalink
Refactor PropertyStore.SetInteger
Browse files Browse the repository at this point in the history
  • Loading branch information
elachlan committed Aug 1, 2024
1 parent 3ec2dbb commit 715155e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ internal void WmImeSetFocus()
private void WmImeStartComposition(ref Message m)
{
// Need to call the property store directly because the WmImeCharsToIgnore property is locked when ImeCharsToIgnoreDisabled.
Properties.SetInteger(s_imeWmCharsToIgnoreProperty, ImeCharsToIgnoreEnabled);
Properties.AddValue(s_imeWmCharsToIgnoreProperty, ImeCharsToIgnoreEnabled);
DefWndProc(ref m);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ internal LinkBehavior LinkBehaviorInternal
Debug.Assert(value is >= LinkBehavior.SystemDefault and <= LinkBehavior.NeverUnderline);
if (value != LinkBehavior)
{
Properties.SetInteger(s_propLinkCellLinkBehavior, (int)value);
Properties.AddValue(s_propLinkCellLinkBehavior, value);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/System.Windows.Forms/src/System/Windows/Forms/Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2660,7 +2660,7 @@ public void AddOwnedForm(Form? ownedForm)
}

ownedForms[ownedFormsCount] = ownedForm;
Properties.SetInteger(s_propOwnedFormsCount, ownedFormsCount + 1);
Properties.AddValue(s_propOwnedFormsCount, ownedFormsCount + 1);
}

// When shrinking the form (i.e. going from Large Fonts to Small
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ public bool ContainsObjectThatIsNotNull(int key)
/// </summary>
public void RemoveValue(int key) => _values.Remove(key);

// REMOVE
/// <summary>
/// Stores the given value in the key.
/// </summary>
public void SetInteger(int key, int value) => _values[key] = value;

// REMOVE
/// <summary>
/// Stores the given value in the key.
Expand Down

0 comments on commit 715155e

Please sign in to comment.