Remove EquationTextBox from KeyGraphFeaturesPanel (#833)
* remove EquationBox from KFG * polish * improve templates * fix issue with dark theme and MathRichEditBox
This commit is contained in:
committed by
Dave Grochocki
parent
fe599e31f8
commit
dc79ec65f6
@@ -35,7 +35,6 @@ EquationTextBox::EquationTextBox()
|
||||
void EquationTextBox::OnApplyTemplate()
|
||||
{
|
||||
m_equationButton = dynamic_cast<ToggleButton ^>(GetTemplateChild("EquationButton"));
|
||||
m_kgfEquationButton = dynamic_cast<Button ^>(GetTemplateChild("KGFEquationButton"));
|
||||
m_richEditBox = dynamic_cast<MathRichEditBox ^>(GetTemplateChild("MathRichEditBox"));
|
||||
m_deleteButton = dynamic_cast<Button ^>(GetTemplateChild("DeleteButton"));
|
||||
m_removeButton = dynamic_cast<Button ^>(GetTemplateChild("RemoveButton"));
|
||||
@@ -74,11 +73,6 @@ void EquationTextBox::OnApplyTemplate()
|
||||
m_richEditContextMenu->Opening += ref new EventHandler<Platform::Object ^>(this, &EquationTextBox::OnRichEditMenuOpening);
|
||||
}
|
||||
|
||||
if (m_kgfEquationButton != nullptr)
|
||||
{
|
||||
m_kgfEquationButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnKGFEquationButtonClicked);
|
||||
}
|
||||
|
||||
if (m_deleteButton != nullptr)
|
||||
{
|
||||
m_deleteButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnDeleteButtonClicked);
|
||||
@@ -208,11 +202,6 @@ void EquationTextBox::OnEquationButtonClicked(Object ^ sender, RoutedEventArgs ^
|
||||
AutomationProperties::SetName(m_equationButton, equationButtonMessage);
|
||||
}
|
||||
|
||||
void EquationTextBox::OnKGFEquationButtonClicked(Object ^ sender, RoutedEventArgs ^ e)
|
||||
{
|
||||
EquationButtonClicked(this, ref new RoutedEventArgs());
|
||||
}
|
||||
|
||||
void EquationTextBox::OnRemoveButtonClicked(Object ^ sender, RoutedEventArgs ^ e)
|
||||
{
|
||||
if (IsAddEquationMode)
|
||||
@@ -350,7 +339,7 @@ bool EquationTextBox::RichEditHasContent()
|
||||
{
|
||||
text = m_richEditBox->MathText;
|
||||
}
|
||||
return (!text->IsEmpty() && m_HasFocus);
|
||||
return !text->IsEmpty() && m_HasFocus;
|
||||
}
|
||||
|
||||
void EquationTextBox::OnRichEditMenuOpening(Object ^ /*sender*/, Object ^ /*args*/)
|
||||
|
@@ -54,7 +54,6 @@ namespace CalculatorApp
|
||||
|
||||
void OnDeleteButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnEquationButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnKGFEquationButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
||||
void OnRemoveButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnColorChooserButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnFunctionButtonClicked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
@@ -67,7 +66,6 @@ namespace CalculatorApp
|
||||
|
||||
CalculatorApp::Controls::MathRichEditBox ^ m_richEditBox;
|
||||
Windows::UI::Xaml::Controls::Primitives::ToggleButton ^ m_equationButton;
|
||||
Windows::UI::Xaml::Controls::Button ^ m_kgfEquationButton;
|
||||
Windows::UI::Xaml::Controls::Button ^ m_deleteButton;
|
||||
Windows::UI::Xaml::Controls::Button ^ m_removeButton;
|
||||
Windows::UI::Xaml::Controls::Button ^ m_functionButton;
|
||||
|
Reference in New Issue
Block a user