diff --git a/SmartPanel.xaml.cpp b/SmartPanel.xaml.cpp index 66770c3bdae5959c543e62dc22084f84f8a286a5..aebe1edbde5e1992e5998182ad8176f5bf826e42 100644 --- a/SmartPanel.xaml.cpp +++ b/SmartPanel.xaml.cpp @@ -1960,3 +1960,34 @@ Object ^ RingClientUWP::Views::CallStatusForIncomingCallStaticEllipse::ConvertBa RingClientUWP::Views::CallStatusForIncomingCallStaticEllipse::CallStatusForIncomingCallStaticEllipse() {} + + +void RingClientUWP::Views::SmartPanel::_ringTxtBx__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) +{ + for (auto item : SmartPanelItemsViewModel::instance->itemsList) { + if (item->_contact->_name == _ringTxtBx_->Text || item->_contact->ringID_ == _ringTxtBx_->Text) { + SmartPanelItemsViewModel::instance->_selectedItem = item; + summonMessageTextPage(); + } + + auto contact = ContactsViewModel::instance->addNewContact(_ringTxtBx_->Text, "", ContactStatus::WAITING_FOR_ACTIVATION); + RingD::instance->lookUpName(_ringTxtBx_->Text); + + _ringTxtBx_->Text = ""; + + for (auto item : SmartPanelItemsViewModel::instance->itemsList) { + item->_showMe = Windows::UI::Xaml::Visibility::Visible; + } + return; + } + + for (auto item : SmartPanelItemsViewModel::instance->itemsList) { + auto str1 = Utils::toString(item->_contact->_name); + auto str2 = Utils::toString(_ringTxtBx_->Text); + + if (str1.find(str2) != std::string::npos) + item->_showMe = Windows::UI::Xaml::Visibility::Visible; + else + item->_showMe = Windows::UI::Xaml::Visibility::Collapsed; + } +} diff --git a/SmartPanel.xaml.h b/SmartPanel.xaml.h index 9b5d6fedb80e4badb0f9a70979ff6b4561257cda..bb25ba4f021e6abdee88351816f6b47624144169 100644 --- a/SmartPanel.xaml.h +++ b/SmartPanel.xaml.h @@ -220,6 +220,7 @@ private: MenuOpen menuOpen; void Grid_PointerReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); void OnincomingAccountMessage(Platform::String ^accountId, Platform::String ^from, Platform::String ^payload); + void _ringTxtBx__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); }; } }