calculator/src/GraphControl/Models/Equation.h
Rudy Huyn 534139d67d GraphControl: refactoring and optimizations (#831)
* GraphControl cleaning

* replace textbox value after submission

* rebase

* rebase

* rebase

* Add filters

* rebase!

* rebase
2019-12-13 16:33:08 -08:00

42 lines
1.1 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "Utils.h"
#include <string>
namespace GraphControl
{
[Windows::UI::Xaml::Data::Bindable] public ref class Equation sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
{
public:
Equation();
OBSERVABLE_OBJECT();
OBSERVABLE_NAMED_PROPERTY_RW(Platform::String ^, Expression);
OBSERVABLE_NAMED_PROPERTY_RW(bool, IsLineEnabled);
OBSERVABLE_NAMED_PROPERTY_RW(bool, IsValidated);
OBSERVABLE_NAMED_PROPERTY_RW(bool, HasGraphError);
property Windows::UI::Color LineColor
{
Windows::UI::Color get();
void set(Windows::UI::Color value);
}
static property Platform::String
^ LineColorPropertyName { Platform::String ^ get(); }
public : Platform::String
^ GetRequest();
bool IsGraphableEquation();
private:
std::wstring GetExpression();
private:
Windows::UI::Color m_LineColor;
};
}