mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 13:23:13 -07:00
Hello GitHub
This commit is contained in:
parent
456fe5e355
commit
c13b8a099e
822 changed files with 276650 additions and 75 deletions
|
@ -0,0 +1,56 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using MS.Internal.Mita.Foundation.Waiters;
|
||||
|
||||
namespace Calculator.UIAutomationLibrary.Components
|
||||
{
|
||||
public class ProgrammerCalculatorLfm
|
||||
{
|
||||
public ProgrammerCalculatorLfm(ProgrammerCalculatorPom programmerCalculatorPom)
|
||||
{
|
||||
this.ObjectModel = programmerCalculatorPom;
|
||||
}
|
||||
|
||||
public ProgrammerCalculatorPom ObjectModel { get; }
|
||||
|
||||
public void EnsureFullKeypad()
|
||||
{
|
||||
if (!this.ObjectModel.FullKeypadButton.IsSelected)
|
||||
{
|
||||
this.ObjectModel.FullKeypadButton.Select();
|
||||
}
|
||||
}
|
||||
|
||||
public void EnsureBitTogglingKeypad()
|
||||
{
|
||||
if (!this.ObjectModel.BitFlipKeypadButton.IsSelected)
|
||||
{
|
||||
this.ObjectModel.BitFlipKeypadButton.Select();
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeBitLength()
|
||||
{
|
||||
this.ObjectModel.GetCurrentBitLengthButton().Invoke();
|
||||
}
|
||||
|
||||
public MemoryLfm OpenMemory()
|
||||
{
|
||||
MemoryLfm lfm = new MemoryLfm(this.ObjectModel.MemoryControls);
|
||||
lfm.OpenBody();
|
||||
return lfm;
|
||||
}
|
||||
|
||||
public void FiveMemorySet()
|
||||
{
|
||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
||||
{
|
||||
this.ObjectModel.NumberPad.FiveButton.Invoke();
|
||||
waiter.TryWait();
|
||||
}
|
||||
|
||||
this.ObjectModel.MemoryControls.SetButton.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue