Merge pull request #3 from nventive/dev/dr/Scientific

Enable support of Scientific calculator
This commit is contained in:
David 2019-05-15 11:54:51 -04:00 committed by GitHub
commit 4a1d4dff49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 15 deletions

View file

@ -43,7 +43,7 @@ namespace CalculatorApp
} }
public static readonly DependencyProperty IsStandardProperty = 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 = 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
{ {
@ -64,7 +64,7 @@ namespace CalculatorApp
// Using a DependencyProperty as the backing store for IsProgrammer. This enables animation, styling, binding, etc... // Using a DependencyProperty as the backing store for IsProgrammer. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsProgrammerProperty = 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;
@ -383,8 +383,7 @@ namespace CalculatorApp
void EnsureScientific() void EnsureScientific()
{ {
// UNO TODO OpsPanel.EnsureScientificOps();
// OpsPanel.EnsureScientificOps();
if (ScientificAngleButtons == null) if (ScientificAngleButtons == null)
{ {
@ -404,8 +403,8 @@ namespace CalculatorApp
this.FindName("ProgrammerDisplayPanel"); this.FindName("ProgrammerDisplayPanel");
} }
OpsPanel.EnsureProgrammerRadixOps();
// UNO TODO // UNO TODO
// OpsPanel.EnsureProgrammerRadixOps();
// ProgrammerOperators.SetRadixButton(Model.GetCurrentRadixType()); // ProgrammerOperators.SetRadixButton(Model.GetCurrentRadixType());
} }

View file

@ -74,7 +74,7 @@ namespace CalculatorApp
} }
} }
void EnsureScientificOps() internal void EnsureScientificOps()
{ {
if (ScientificOperators == null) if (ScientificOperators == null)
{ {
@ -82,7 +82,7 @@ namespace CalculatorApp
} }
} }
void EnsureProgrammerRadixOps() internal void EnsureProgrammerRadixOps()
{ {
if (ProgrammerRadixOperators == null) if (ProgrammerRadixOperators == null)
{ {
@ -90,7 +90,7 @@ namespace CalculatorApp
} }
} }
void EnsureProgrammerBitFlipPanel() internal void EnsureProgrammerBitFlipPanel()
{ {
if (BitFlipPanel == null) if (BitFlipPanel == null)
{ {