mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-16 02:02:51 -07:00
* 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
33 lines
1.3 KiB
C++
33 lines
1.3 KiB
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#include "../Common/Utils.h"
|
|
#include "EquationViewModel.h"
|
|
#include "VariableViewModel.h"
|
|
|
|
namespace CalculatorApp::ViewModel
|
|
{
|
|
[Windows::UI::Xaml::Data::Bindable] public ref class GraphingCalculatorViewModel sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
|
{
|
|
public:
|
|
GraphingCalculatorViewModel();
|
|
|
|
OBSERVABLE_OBJECT();
|
|
OBSERVABLE_PROPERTY_R(bool, IsDecimalEnabled);
|
|
OBSERVABLE_PROPERTY_R(Windows::Foundation::Collections::IObservableVector<EquationViewModel ^> ^, Equations);
|
|
OBSERVABLE_PROPERTY_R(Windows::Foundation::Collections::IObservableVector<VariableViewModel ^> ^, Variables);
|
|
OBSERVABLE_PROPERTY_R(EquationViewModel ^, SelectedEquation);
|
|
|
|
COMMAND_FOR_METHOD(ButtonPressed, GraphingCalculatorViewModel::OnButtonPressed);
|
|
|
|
event Windows::Foundation::EventHandler<VariableChangedEventArgs> ^ VariableUpdated;
|
|
|
|
void UpdateVariables(Windows::Foundation::Collections::IMap<Platform::String ^, GraphControl::Variable ^> ^ variables);
|
|
|
|
void SetSelectedEquation(EquationViewModel ^ equation);
|
|
private:
|
|
void OnButtonPressed(Platform::Object ^ parameter);
|
|
};
|
|
}
|