Enable support of Scientific calculator

This commit is contained in:
Dr.Rx 2019-05-15 11:41:36 -04:00 committed by Jérôme Laban
commit 1f9abe78a3
2 changed files with 14 additions and 15 deletions

View file

@ -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,7 +54,7 @@ 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
{
@ -64,7 +64,7 @@ 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;
@ -383,8 +383,7 @@ namespace CalculatorApp
void EnsureScientific()
{
// UNO TODO
// OpsPanel.EnsureScientificOps();
OpsPanel.EnsureScientificOps();
if (ScientificAngleButtons == null)
{
@ -404,8 +403,8 @@ namespace CalculatorApp
this.FindName("ProgrammerDisplayPanel");
}
OpsPanel.EnsureProgrammerRadixOps();
// UNO TODO
// OpsPanel.EnsureProgrammerRadixOps();
// ProgrammerOperators.SetRadixButton(Model.GetCurrentRadixType());
}

View file

@ -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)
{