Fixed "name can be simplified"

This commit is contained in:
Joshua Askharoun
2021-03-31 17:20:20 -05:00
parent 9b09412b45
commit 799fca8d97
384 changed files with 3966 additions and 3966 deletions
@@ -22,8 +22,8 @@ namespace Microsoft.Iris.ModelItems
static BooleanChoice()
{
BooleanChoice.s_defaultOptions[0] = BooleanBoxes.FalseBox;
BooleanChoice.s_defaultOptions[1] = BooleanBoxes.TrueBox;
s_defaultOptions[0] = BooleanBoxes.FalseBox;
s_defaultOptions[1] = BooleanBoxes.TrueBox;
}
public BooleanChoice()
+3 -3
View File
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.ModelItems
public Choice()
{
this._chosen = Choice.s_noSelectionSentinal;
this._chosen = s_noSelectionSentinal;
this._default = 0;
}
@@ -133,7 +133,7 @@ namespace Microsoft.Iris.ModelItems
this.FirePrevNextNotifications(hasPreviousValue, hasNextValue);
}
public bool HasSelection => this._chosen != Choice.s_noSelectionSentinal && this._options != null;
public bool HasSelection => this._chosen != s_noSelectionSentinal && this._options != null;
public bool HasPreviousValue => this.HasPreviousValueWorker(this._wrap);
@@ -228,7 +228,7 @@ namespace Microsoft.Iris.ModelItems
object IUIValueRange.ObjectValue => this.ChosenValue;
public void Clear() => this.SetChosenIndex(Choice.s_noSelectionSentinal);
public void Clear() => this.SetChosenIndex(s_noSelectionSentinal);
private void OnListContentsChanged(IList senderList, UIListContentsChangedArgs args)
{
+9 -9
View File
@@ -408,10 +408,10 @@ namespace Microsoft.Iris.ModelItems
bool flag = true;
switch (this.GetLastFocusLocation())
{
case ScrollModel.ItemLocation.OffscreenInNearDirection:
case ItemLocation.OffscreenInNearDirection:
flag = nearDirection;
break;
case ScrollModel.ItemLocation.Onscreen:
case ItemLocation.Onscreen:
flag = !this.PotentialNavigationTargetIsOnscreen(this.NearFarToDirection(nearDirection), out UIClass _);
if (!flag && this._useUserDisposition && this.NonDefaultUserDisposition())
{
@@ -419,11 +419,11 @@ namespace Microsoft.Iris.ModelItems
break;
}
break;
case ScrollModel.ItemLocation.OffscreenInFarDirection:
case ItemLocation.OffscreenInFarDirection:
flag = !nearDirection;
break;
}
ScrollModel.AssignFocusAction instance = ScrollModel.AssignFocusAction.GetInstance(this, this.GetAssignFocusPoint(nearDirection), nearDirection, false);
ScrollModel.AssignFocusAction instance = AssignFocusAction.GetInstance(this, this.GetAssignFocusPoint(nearDirection), nearDirection, false);
if (!flag)
{
instance.Go();
@@ -480,17 +480,17 @@ namespace Microsoft.Iris.ModelItems
return !near ? Direction.East : Direction.West;
}
private bool LastFocusIsOnscreen() => this.GetItemLocation(this._lastFocusedItem) == ScrollModel.ItemLocation.Onscreen;
private bool LastFocusIsOnscreen() => this.GetItemLocation(this._lastFocusedItem) == ItemLocation.Onscreen;
private ScrollModel.ItemLocation GetLastFocusLocation() => this.GetItemLocation(this._lastFocusedItem);
private bool ItemIsOnscreen(ViewItem item) => this.GetItemLocation(item) == ScrollModel.ItemLocation.Onscreen;
private bool ItemIsOnscreen(ViewItem item) => this.GetItemLocation(item) == ItemLocation.Onscreen;
private ScrollModel.ItemLocation GetItemLocation(ViewItem item)
{
RectangleF scrollerRect = this.GetScrollerRect(false);
RectangleF viewItemRect = this.GetViewItemRect(item, false);
return !(RectangleF.Intersect(scrollerRect, viewItemRect) == viewItemRect) ? (this.ScrollOrientation != Orientation.Horizontal ? (viewItemRect.Top >= (double)scrollerRect.Top ? ScrollModel.ItemLocation.OffscreenInFarDirection : ScrollModel.ItemLocation.OffscreenInNearDirection) : (viewItemRect.Left < (double)scrollerRect.Left || this._targetItem.Zone.Session.IsRtl && viewItemRect.Right > (double)scrollerRect.Right ? ScrollModel.ItemLocation.OffscreenInNearDirection : ScrollModel.ItemLocation.OffscreenInFarDirection)) : ScrollModel.ItemLocation.Onscreen;
return !(RectangleF.Intersect(scrollerRect, viewItemRect) == viewItemRect) ? (this.ScrollOrientation != Orientation.Horizontal ? (viewItemRect.Top >= (double)scrollerRect.Top ? ItemLocation.OffscreenInFarDirection : ItemLocation.OffscreenInNearDirection) : (viewItemRect.Left < (double)scrollerRect.Left || this._targetItem.Zone.Session.IsRtl && viewItemRect.Right > (double)scrollerRect.Right ? ItemLocation.OffscreenInNearDirection : ItemLocation.OffscreenInFarDirection)) : ItemLocation.Onscreen;
}
private bool PotentialNavigationTargetIsOnscreen(Direction dir, out UIClass navigationResult) => this.PotentialNavigationTargetIsOnscreen(this._lastFocusedItem.UI, dir, out navigationResult);
@@ -577,7 +577,7 @@ namespace Microsoft.Iris.ModelItems
}
if (!flag3)
return;
ScrollModel.AssignFocusAction instance = ScrollModel.AssignFocusAction.GetInstance(this, PointF.Zero, home, true);
ScrollModel.AssignFocusAction instance = AssignFocusAction.GetInstance(this, PointF.Zero, home, true);
if (!flag2)
instance.Go();
else
@@ -605,7 +605,7 @@ namespace Microsoft.Iris.ModelItems
this.ActualScrollIntoViewDisposition.Reset();
this.ActualScrollIntoViewDisposition.Enabled = true;
this.SetPendingFocusAreaOfInterest(this._lastFocusedItem.UI);
this.SetPostLayoutAction(ScrollModel.NavigateAction.GetInstance(this, nearDirection, direction));
this.SetPostLayoutAction(NavigateAction.GetInstance(this, nearDirection, direction));
this.OnLayoutInputChanged();
}
else if (nearDirection)