* Allow copying graph as image * Persist variables * Revert "Allow copying graph as image" This reverts commit 4fc9d798bc5f3ff82efc4fb00140103213fb81e2. * fix binding bug * undo cert change * fix animation * remove extra lines * remove overrides * undo key comment
34 lines
1.3 KiB
C++
34 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);
|
|
};
|
|
}
|