Commit 2a1fb2c7 authored by Nicolas Jager's avatar Nicolas Jager

smartpanel : set logic for _addButton_

Change-Id: Id7ad827a414e00f6da77f954edcd1806693e40f1
Tuleap: #790
parent 8fb4296a
......@@ -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;
}
}
......@@ -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);
};
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment