diff --git a/src/Calculator.Shared/Views/Calculator.xaml.cs b/src/Calculator.Shared/Views/Calculator.xaml.cs index ea230155..3d591e48 100644 --- a/src/Calculator.Shared/Views/Calculator.xaml.cs +++ b/src/Calculator.Shared/Views/Calculator.xaml.cs @@ -43,7 +43,7 @@ namespace CalculatorApp } public static readonly DependencyProperty IsStandardProperty = - DependencyProperty.Register("IsStandard", typeof(bool), typeof(Calculator), new PropertyMetadata(false)); + DependencyProperty.Register("IsStandard", typeof(bool), typeof(Calculator), new PropertyMetadata(false, (snd, args) => ((Calculator)snd).OnIsStandardPropertyChanged((bool)args.OldValue, (bool)args.NewValue))); @@ -54,9 +54,9 @@ namespace CalculatorApp } public static readonly DependencyProperty IsScientificProperty = - DependencyProperty.Register("IsScientific", typeof(bool), typeof(Calculator), new PropertyMetadata(false)); + DependencyProperty.Register("IsScientific", typeof(bool), typeof(Calculator), new PropertyMetadata(false, (snd, args) => ((Calculator)snd).OnIsScientificPropertyChanged((bool)args.OldValue, (bool)args.NewValue))); - public bool IsProgrammer + public bool IsProgrammer { get { return (bool)GetValue(IsProgrammerProperty); } set { SetValue(IsProgrammerProperty, value); } @@ -64,10 +64,10 @@ namespace CalculatorApp // Using a DependencyProperty as the backing store for IsProgrammer. This enables animation, styling, binding, etc... public static readonly DependencyProperty IsProgrammerProperty = - DependencyProperty.Register("IsProgrammer", typeof(bool), typeof(Calculator), new PropertyMetadata(false)); + DependencyProperty.Register("IsProgrammer", typeof(bool), typeof(Calculator), new PropertyMetadata(false, (snd, args) => ((Calculator)snd).OnIsProgrammerPropertyChanged((bool)args.OldValue, (bool)args.NewValue))); - Windows.UI.Xaml.Controls.ListView m_tokenList; + Windows.UI.Xaml.Controls.ListView m_tokenList; Windows.UI.Xaml.Controls.MenuFlyout m_displayFlyout; bool m_doAnimate; bool m_resultAnimate; @@ -383,8 +383,7 @@ namespace CalculatorApp void EnsureScientific() { - // UNO TODO - // OpsPanel.EnsureScientificOps(); + OpsPanel.EnsureScientificOps(); if (ScientificAngleButtons == null) { @@ -404,12 +403,12 @@ namespace CalculatorApp this.FindName("ProgrammerDisplayPanel"); } - // UNO TODO - // OpsPanel.EnsureProgrammerRadixOps(); - // ProgrammerOperators.SetRadixButton(Model.GetCurrentRadixType()); - } + OpsPanel.EnsureProgrammerRadixOps(); + // UNO TODO + // ProgrammerOperators.SetRadixButton(Model.GetCurrentRadixType()); + } - void OnCalcPropertyChanged(object sender, PropertyChangedEventArgs e) + void OnCalcPropertyChanged(object sender, PropertyChangedEventArgs e) { String prop = e.PropertyName; if (prop == nameof(StandardCalculatorViewModel.IsMemoryEmpty)) diff --git a/src/Calculator.Shared/Views/OperatorsPanel.xaml.cs b/src/Calculator.Shared/Views/OperatorsPanel.xaml.cs index 09f98965..2f16be96 100644 --- a/src/Calculator.Shared/Views/OperatorsPanel.xaml.cs +++ b/src/Calculator.Shared/Views/OperatorsPanel.xaml.cs @@ -74,7 +74,7 @@ namespace CalculatorApp } } - void EnsureScientificOps() + internal void EnsureScientificOps() { if (ScientificOperators == null) { @@ -82,7 +82,7 @@ namespace CalculatorApp } } - void EnsureProgrammerRadixOps() + internal void EnsureProgrammerRadixOps() { if (ProgrammerRadixOperators == null) { @@ -90,7 +90,7 @@ namespace CalculatorApp } } - void EnsureProgrammerBitFlipPanel() + internal void EnsureProgrammerBitFlipPanel() { if (BitFlipPanel == null) {