mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-31 03:50:02 -07:00
Persist variable settings after graph is plotted (#1055)
* Allow copying graph as image
* Persist variables
* Revert "Allow copying graph as image"
This reverts commit 4fc9d798bc
.
* fix binding bug
* undo cert change
* fix animation
* remove extra lines
* remove overrides
* undo key comment
This commit is contained in:
parent
1b72ecb6b3
commit
28dbdb3d94
10 changed files with 125 additions and 50 deletions
|
@ -10,6 +10,7 @@ using namespace Platform::Collections;
|
|||
using namespace Windows::Foundation;
|
||||
using namespace Windows::Foundation::Collections;
|
||||
using namespace Windows::UI::Xaml::Data;
|
||||
using namespace GraphControl;
|
||||
|
||||
namespace CalculatorApp::ViewModel
|
||||
{
|
||||
|
@ -24,12 +25,12 @@ namespace CalculatorApp::ViewModel
|
|||
{
|
||||
}
|
||||
|
||||
void GraphingCalculatorViewModel::UpdateVariables(IMap<String ^, double> ^ variables)
|
||||
void GraphingCalculatorViewModel::UpdateVariables(IMap<String ^, Variable ^> ^ variables)
|
||||
{
|
||||
Variables->Clear();
|
||||
for (auto var : variables)
|
||||
for (auto variablePair : variables)
|
||||
{
|
||||
auto variable = ref new VariableViewModel(var->Key, var->Value);
|
||||
auto variable = ref new VariableViewModel(variablePair->Key, variablePair->Value);
|
||||
variable->VariableUpdated += ref new EventHandler<VariableChangedEventArgs>([this, variable](Object ^ sender, VariableChangedEventArgs e) {
|
||||
VariableUpdated(variable, VariableChangedEventArgs{ e.variableName, e.newValue });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue