mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
resolve some warnings (#1564)
This commit is contained in:
parent
ce5a1cb280
commit
1fa8c4bfde
11 changed files with 37 additions and 24 deletions
|
@ -499,9 +499,6 @@ namespace CalculatorApp
|
||||||
private Dictionary<int, WindowFrameService> m_secondaryWindows = new Dictionary<int, WindowFrameService>();
|
private Dictionary<int, WindowFrameService> m_secondaryWindows = new Dictionary<int, WindowFrameService>();
|
||||||
private int m_mainViewId;
|
private int m_mainViewId;
|
||||||
private bool m_preLaunched;
|
private bool m_preLaunched;
|
||||||
|
|
||||||
// CSHARP_MIGRATION: TODO: check whether or not this field is in use.
|
|
||||||
private Windows.UI.Xaml.Controls.Primitives.Popup m_aboutPopup;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,8 +223,12 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<object> CurrentChanged;
|
public event EventHandler<object> CurrentChanged;
|
||||||
public event CurrentChangingEventHandler CurrentChanging; // CSHARP_MIGRATION: TODO: check why this member is never being used.
|
|
||||||
public event VectorChangedEventHandler<object> VectorChanged;
|
public event VectorChangedEventHandler<object> VectorChanged;
|
||||||
|
public event CurrentChangingEventHandler CurrentChanging
|
||||||
|
{
|
||||||
|
add => throw new NotImplementedException();
|
||||||
|
remove => throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
IList m_source;
|
IList m_source;
|
||||||
int m_currentPosition;
|
int m_currentPosition;
|
||||||
|
|
|
@ -38,7 +38,6 @@ namespace CalculatorApp
|
||||||
public OverflowTextBlock()
|
public OverflowTextBlock()
|
||||||
{
|
{
|
||||||
m_isAccessibilityViewControl = false;
|
m_isAccessibilityViewControl = false;
|
||||||
m_ignoreViewChanged = false;
|
|
||||||
m_expressionContent = null;
|
m_expressionContent = null;
|
||||||
m_itemsControl = null;
|
m_itemsControl = null;
|
||||||
m_expressionContainer = null;
|
m_expressionContainer = null;
|
||||||
|
@ -322,7 +321,6 @@ namespace CalculatorApp
|
||||||
private const double SCROLL_RATIO = 0.7;
|
private const double SCROLL_RATIO = 0.7;
|
||||||
|
|
||||||
private bool m_isAccessibilityViewControl;
|
private bool m_isAccessibilityViewControl;
|
||||||
private bool m_ignoreViewChanged;
|
|
||||||
private Windows.UI.Xaml.FrameworkElement m_expressionContent;
|
private Windows.UI.Xaml.FrameworkElement m_expressionContent;
|
||||||
private Windows.UI.Xaml.Controls.ItemsControl m_itemsControl;
|
private Windows.UI.Xaml.Controls.ItemsControl m_itemsControl;
|
||||||
private Windows.UI.Xaml.Controls.ScrollViewer m_expressionContainer;
|
private Windows.UI.Xaml.Controls.ScrollViewer m_expressionContainer;
|
||||||
|
|
|
@ -107,14 +107,11 @@ namespace CalculatorApp
|
||||||
{
|
{
|
||||||
case EquationLineStyle.Dot:
|
case EquationLineStyle.Dot:
|
||||||
return resourceLoader.GetResourceString("dotLineStyleAutomationName");
|
return resourceLoader.GetResourceString("dotLineStyleAutomationName");
|
||||||
break;
|
|
||||||
case EquationLineStyle.Dash:
|
case EquationLineStyle.Dash:
|
||||||
return resourceLoader.GetResourceString("dashLineStyleAutomationName");
|
return resourceLoader.GetResourceString("dashLineStyleAutomationName");
|
||||||
break;
|
|
||||||
case EquationLineStyle.Solid:
|
case EquationLineStyle.Solid:
|
||||||
default:
|
default:
|
||||||
return resourceLoader.GetResourceString("solidLineStyleAutomationName");
|
return resourceLoader.GetResourceString("solidLineStyleAutomationName");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -629,7 +629,6 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Windows.UI.Xaml.Controls.ListView m_tokenList;
|
|
||||||
private Windows.UI.Xaml.Controls.MenuFlyout m_displayFlyout;
|
private Windows.UI.Xaml.Controls.MenuFlyout m_displayFlyout;
|
||||||
private bool m_doAnimate;
|
private bool m_doAnimate;
|
||||||
private bool m_resultAnimate;
|
private bool m_resultAnimate;
|
||||||
|
@ -646,7 +645,6 @@ namespace CalculatorApp
|
||||||
private string m_dockPanelMemoryList;
|
private string m_dockPanelMemoryList;
|
||||||
|
|
||||||
private Windows.UI.Xaml.Controls.PivotItem m_pivotItem;
|
private Windows.UI.Xaml.Controls.PivotItem m_pivotItem;
|
||||||
private bool m_IsDigit = false;
|
|
||||||
private Memory m_memory;
|
private Memory m_memory;
|
||||||
|
|
||||||
private void HistoryFlyout_Opened(object sender, object args)
|
private void HistoryFlyout_Opened(object sender, object args)
|
||||||
|
|
|
@ -34,7 +34,20 @@ namespace CalculatorApp
|
||||||
get { return (StandardCalculatorViewModel)this.DataContext; }
|
get { return (StandardCalculatorViewModel)this.DataContext; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsErrorVisualState { get; set; }
|
public bool IsErrorVisualState
|
||||||
|
{
|
||||||
|
get => m_isErrorVisualState;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(m_isErrorVisualState != value)
|
||||||
|
{
|
||||||
|
m_isErrorVisualState = value;
|
||||||
|
string newState = m_isErrorVisualState ? "ErrorLayout" : "NoErrorLayout";
|
||||||
|
VisualStateManager.GoToState(this, newState, false);
|
||||||
|
NumberPad.IsErrorVisualState = m_isErrorVisualState;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string ParenthesisCountToString(uint count)
|
public string ParenthesisCountToString(uint count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,19 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
private System.Windows.Input.ICommand donotuse_ButtonPressed;
|
private System.Windows.Input.ICommand donotuse_ButtonPressed;
|
||||||
|
|
||||||
public bool IsErrorVisualState { get; set; }
|
public bool IsErrorVisualState
|
||||||
|
{
|
||||||
|
get => m_isErrorVisualState;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(m_isErrorVisualState != value)
|
||||||
|
{
|
||||||
|
m_isErrorVisualState = value;
|
||||||
|
string newState = m_isErrorVisualState ? "ErrorFlyout" : "NoErrorFlyout";
|
||||||
|
VisualStateManager.GoToState(this, newState, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnAngleButtonPressed(object commandParameter)
|
private void OnAngleButtonPressed(object commandParameter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,6 @@ using Windows.UI.Xaml.Data;
|
||||||
using Windows.UI.Xaml.Input;
|
using Windows.UI.Xaml.Input;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
using Windows.UI.Core;
|
|
||||||
|
|
||||||
namespace CalculatorApp
|
namespace CalculatorApp
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,9 +43,6 @@ namespace CalculatorApp
|
||||||
public static readonly DependencyProperty RowHeightProperty =
|
public static readonly DependencyProperty RowHeightProperty =
|
||||||
DependencyProperty.Register(nameof(RowHeight), typeof(Windows.UI.Xaml.GridLength), typeof(HistoryList), new PropertyMetadata(default(Windows.UI.Xaml.GridLength)));
|
DependencyProperty.Register(nameof(RowHeight), typeof(Windows.UI.Xaml.GridLength), typeof(HistoryList), new PropertyMetadata(default(Windows.UI.Xaml.GridLength)));
|
||||||
|
|
||||||
private Windows.Foundation.Rect m_visibleBounds;
|
|
||||||
private Windows.Foundation.Rect m_coreBounds;
|
|
||||||
|
|
||||||
private void ListView_ItemClick(object sender, ItemClickEventArgs e)
|
private void ListView_ItemClick(object sender, ItemClickEventArgs e)
|
||||||
{
|
{
|
||||||
HistoryViewModel historyVM = (DataContext as HistoryViewModel);
|
HistoryViewModel historyVM = (DataContext as HistoryViewModel);
|
||||||
|
|
|
@ -49,8 +49,6 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Windows.Foundation.Rect m_visibleBounds;
|
|
||||||
private Windows.Foundation.Rect m_coreBounds;
|
|
||||||
private bool m_isErrorVisualState = false;
|
private bool m_isErrorVisualState = false;
|
||||||
|
|
||||||
private void MemoryListItemClick(object sender, ItemClickEventArgs e)
|
private void MemoryListItemClick(object sender, ItemClickEventArgs e)
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace CalculatorApp
|
||||||
get => this.m_FlowDirectionHorizontalAlignment;
|
get => this.m_FlowDirectionHorizontalAlignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Windows.UI.Xaml.HorizontalAlignment m_FlowDirectionHorizontalAlignment;
|
private Windows.UI.Xaml.HorizontalAlignment m_FlowDirectionHorizontalAlignment = default(HorizontalAlignment);
|
||||||
|
|
||||||
public void AnimateConverter()
|
public void AnimateConverter()
|
||||||
{
|
{
|
||||||
|
@ -373,11 +373,11 @@ namespace CalculatorApp
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Lazy<UISettings> uiSettings = new Lazy<UISettings>(true);
|
private static Lazy<UISettings> uiSettings = new Lazy<UISettings>(true);
|
||||||
private Windows.UI.Xaml.FlowDirection m_layoutDirection;
|
private Windows.UI.Xaml.FlowDirection m_layoutDirection = default(FlowDirection);
|
||||||
private Windows.UI.Xaml.Controls.MenuFlyout m_resultsFlyout;
|
private Windows.UI.Xaml.Controls.MenuFlyout m_resultsFlyout = default(MenuFlyout);
|
||||||
|
|
||||||
private string m_chargesMayApplyText;
|
private string m_chargesMayApplyText = string.Empty;
|
||||||
private string m_failedToRefreshText;
|
private string m_failedToRefreshText = string.Empty;
|
||||||
|
|
||||||
private bool m_meteredConnectionOverride;
|
private bool m_meteredConnectionOverride;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue