blob: e9805bb48298748b3a35c60e4f3d2da88e3d0dfb [file] [log] [blame]
Nicolas Jager998fbd72016-08-08 11:41:28 -04001/**************************************************************************
2* Copyright (C) 2016 by Savoir-faire Linux *
3* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
4* *
5* This program is free software; you can redistribute it and/or modify *
6* it under the terms of the GNU General Public License as published by *
7* the Free Software Foundation; either version 3 of the License, or *
8* (at your option) any later version. *
9* *
10* This program is distributed in the hope that it will be useful, *
11* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13* GNU General Public License for more details. *
14* *
15* You should have received a copy of the GNU General Public License *
16* along with this program. If not, see <http://www.gnu.org/licenses/>. *
17**************************************************************************/
18#include "pch.h"
19
Nicolas Jager8a85e1f2016-08-15 15:11:06 -040020#include "ContactsViewModel.h"
21#include "MessageTextPage.xaml.h"
Nicolas Jager998fbd72016-08-08 11:41:28 -040022#include "SmartPanel.xaml.h"
23#include "RingConsolePanel.xaml.h"
Nicolas Jagere069c412016-08-15 15:00:17 -040024#include "VideoPage.xaml.h"
atraczykacc4c412016-11-10 22:56:52 -050025#include "PreviewPage.xaml.h"
Nicolas Jager998fbd72016-08-08 11:41:28 -040026#include "WelcomePage.xaml.h"
27
atraczykacc4c412016-11-10 22:56:52 -050028#include "gnutls\gnutls.h"
29
Nicolas Jager998fbd72016-08-08 11:41:28 -040030#include "MainPage.xaml.h"
31
32using namespace RingClientUWP;
33using namespace RingClientUWP::Views;
Nicolas Jager8a85e1f2016-08-15 15:11:06 -040034using namespace RingClientUWP::ViewModel;
Nicolas Jager998fbd72016-08-08 11:41:28 -040035
36using namespace Platform;
Nicolas Jager15861202016-08-12 11:13:05 -040037using namespace Windows::ApplicationModel::Core;
Nicolas Jager998fbd72016-08-08 11:41:28 -040038using namespace Windows::Foundation;
39using namespace Windows::Foundation::Collections;
40using namespace Windows::UI::ViewManagement;
41using namespace Windows::UI::Xaml;
42using namespace Windows::UI::Xaml::Controls;
43using namespace Windows::UI::Xaml::Controls::Primitives;
44using namespace Windows::UI::Core;
45using namespace Windows::UI::Xaml::Data;
46using namespace Windows::UI::Xaml::Input;
47using namespace Windows::UI::Xaml::Interop;
Nicolas Jager998fbd72016-08-08 11:41:28 -040048using namespace Windows::UI::Xaml::Navigation;
49using namespace Windows::ApplicationModel::Activation;
50using namespace Windows::Graphics::Display;
51using namespace Windows::System;
atraczyk49f1b572016-10-27 12:33:28 -040052using namespace Concurrency;
Nicolas Jager998fbd72016-08-08 11:41:28 -040053
54MainPage::MainPage()
55{
56 InitializeComponent();
57
atraczyk49f1b572016-10-27 12:33:28 -040058 UserModel::instance->getUserData();
Nicolas Jagerdf0a0672016-10-18 09:25:37 -040059
atraczyk1ddcb5a2016-09-07 16:18:30 -040060 Window::Current->SizeChanged += ref new WindowSizeChangedEventHandler(this, &MainPage::OnResize);
61
Nicolas Jager998fbd72016-08-08 11:41:28 -040062 _welcomeFrame_->Navigate(TypeName(RingClientUWP::Views::WelcomePage::typeid));
63 _smartPanel_->Navigate(TypeName(RingClientUWP::Views::SmartPanel::typeid));
64 _consolePanel_->Navigate(TypeName(RingClientUWP::Views::RingConsolePanel::typeid));
Nicolas Jagere069c412016-08-15 15:00:17 -040065 _videoFrame_->Navigate(TypeName(RingClientUWP::Views::VideoPage::typeid));
atraczykacc4c412016-11-10 22:56:52 -050066 _previewFrame_->Navigate(TypeName(RingClientUWP::Views::PreviewPage::typeid));
Nicolas Jager8a85e1f2016-08-15 15:11:06 -040067 _messageTextFrame_->Navigate(TypeName(RingClientUWP::Views::MessageTextPage::typeid));
68
69 /* connect to delegates */
Nicolas Jagerc551c362016-10-01 19:24:50 -040070 RingD::instance->stateChange += ref new RingClientUWP::StateChange(this, &RingClientUWP::MainPage::OnstateChange);
71 auto smartPanel = dynamic_cast<SmartPanel^>(_smartPanel_->Content);
72 smartPanel->summonMessageTextPage += ref new RingClientUWP::SummonMessageTextPage(this, &RingClientUWP::MainPage::OnsummonMessageTextPage);
73 smartPanel->summonWelcomePage += ref new RingClientUWP::SummonWelcomePage(this, &RingClientUWP::MainPage::OnsummonWelcomePage);
atraczykacc4c412016-11-10 22:56:52 -050074 smartPanel->summonPreviewPage += ref new RingClientUWP::SummonPreviewPage(this, &RingClientUWP::MainPage::OnsummonPreviewPage);
75 smartPanel->hidePreviewPage += ref new RingClientUWP::HidePreviewPage(this, &RingClientUWP::MainPage::OnhidePreviewPage);
Nicolas Jagerc551c362016-10-01 19:24:50 -040076 smartPanel->summonVideoPage += ref new RingClientUWP::SummonVideoPage(this, &RingClientUWP::MainPage::OnsummonVideoPage);
77 auto videoPage = dynamic_cast<VideoPage^>(_videoFrame_->Content);
78 videoPage->pressHangUpCall += ref new RingClientUWP::PressHangUpCall(this, &RingClientUWP::MainPage::OnpressHangUpCall);
Nicolas Jagere72856b2016-10-30 15:06:17 -040079 auto messageTextFrame = dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content);
80 messageTextFrame->closeMessageTextPage += ref new RingClientUWP::CloseMessageTextPage(this, &RingClientUWP::MainPage::OncloseMessageTextPage);
81
atraczyk1ddcb5a2016-09-07 16:18:30 -040082
83 DisplayInformation^ displayInformation = DisplayInformation::GetForCurrentView();
84 dpiChangedtoken = (displayInformation->DpiChanged += ref new TypedEventHandler<DisplayInformation^,
Nicolas Jager7bef1492016-09-14 11:23:29 -040085 Platform::Object^>(this, &MainPage::DisplayProperties_DpiChanged));
atraczyk6290cc32016-10-07 08:47:15 -040086
87 visibilityChangedEventToken = Window::Current->VisibilityChanged +=
atraczyk85e12312016-11-03 10:31:23 -040088 ref new WindowVisibilityChangedEventHandler(this, &MainPage::Application_VisibilityChanged);
atraczyk6290cc32016-10-07 08:47:15 -040089 applicationSuspendingEventToken = Application::Current->Suspending +=
atraczyk85e12312016-11-03 10:31:23 -040090 ref new SuspendingEventHandler(this, &MainPage::Application_Suspending);
atraczyk6290cc32016-10-07 08:47:15 -040091 applicationResumingEventToken = Application::Current->Resuming +=
atraczyk85e12312016-11-03 10:31:23 -040092 ref new EventHandler<Object^>(this, &MainPage::Application_Resuming);
Nicolas Jager998fbd72016-08-08 11:41:28 -040093}
94
95void
96MainPage::OnKeyDown(KeyRoutedEventArgs^ e)
97{
98 if (e->Key == VirtualKey::F5) {
99 _outerSplitView_->OpenPaneLength = Window::Current->Bounds.Width;
100 _outerSplitView_->IsPaneOpen = !_outerSplitView_->IsPaneOpen;
101 }
Nicolas Jager15861202016-08-12 11:13:05 -0400102}
103
104void RingClientUWP::MainPage::_toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
105{
106 _innerSplitView_->IsPaneOpen = !_innerSplitView_->IsPaneOpen;
atraczyk0cf42d72016-09-06 11:16:37 -0400107 if (_innerSplitView_->IsPaneOpen) {
108 dynamic_cast<SmartPanel^>(_smartPanel_->Content)->setMode(Views::SmartPanel::Mode::Normal);
109 _hamburgerButtonBar_->Width = 320;
110 }
111 else {
112 dynamic_cast<SmartPanel^>(_smartPanel_->Content)->setMode(Views::SmartPanel::Mode::Minimized);
113 _hamburgerButtonBar_->Width = 60;
114 }
Nicolas Jager15861202016-08-12 11:13:05 -0400115}
Nicolas Jager8a85e1f2016-08-15 15:11:06 -0400116
117void
118RingClientUWP::MainPage::showFrame(Windows::UI::Xaml::Controls::Frame^ frame)
119{
120 _navGrid_->SetRow(_welcomeFrame_, 0);
121 _navGrid_->SetRow(_messageTextFrame_, 0);
122 _navGrid_->SetRow(_videoFrame_, 0);
123
124 if (frame == _welcomeFrame_) {
125 _navGrid_->SetRow(_welcomeFrame_, 1);
126 } else if (frame == _videoFrame_) {
127 _navGrid_->SetRow(_videoFrame_, 1);
128 } else if (frame == _messageTextFrame_) {
129 _navGrid_->SetRow(_messageTextFrame_, 1);
Nicolas Jager8a85e1f2016-08-15 15:11:06 -0400130 }
131}
atraczyk61b28422016-08-24 09:25:59 -0400132
133void
134RingClientUWP::MainPage::OnNavigatedTo(NavigationEventArgs ^ e)
135{
atraczykacc4c412016-11-10 22:56:52 -0500136 gnutls_global_init();
137 RingD::instance->registerCallbacks();
138 RingD::instance->initDaemon( DRing::DRING_FLAG_CONSOLE_LOG | DRing::DRING_FLAG_DEBUG );
139 Video::VideoManager::instance->captureManager()->EnumerateWebcamsAsync();
atraczyk1ddcb5a2016-09-07 16:18:30 -0400140 showLoadingOverlay(true, false);
141}
142
143void
144RingClientUWP::MainPage::showLoadingOverlay(bool load, bool modal)
145{
146 if (!isLoading && load) {
147 isLoading = true;
148 _loadingOverlay_->Visibility = Windows::UI::Xaml::Visibility::Visible;
149 if (modal) {
150 _fadeInModalStoryboard_->Begin();
151 auto blackBrush = ref new Windows::UI::Xaml::Media::SolidColorBrush(Windows::UI::Colors::Black);
152 _loadingOverlayRect_->Fill = blackBrush;
153 }
154 else {
155 auto whiteBrush = ref new Windows::UI::Xaml::Media::SolidColorBrush(Windows::UI::Colors::White);
156 _loadingOverlayRect_->Fill = whiteBrush;
157 _loadingOverlayRect_->Opacity = 1.0;
158 }
159 OnResize(nullptr, nullptr);
160 }
161 else if (!load) {
162 isLoading = false;
163 _fadeOutStoryboard_->Begin();
164 }
165}
166
167void
168RingClientUWP::MainPage::PositionImage()
169{
170 bounds = ApplicationView::GetForCurrentView()->VisibleBounds;
171
172 auto img = ref new Image();
173 auto bitmapImage = ref new Windows::UI::Xaml::Media::Imaging::BitmapImage();
174 Windows::Foundation::Uri^ uri;
175
176 if (bounds.Width < 1200)
177 uri = ref new Windows::Foundation::Uri("ms-appx:///Assets/TESTS/logo-ring.scale-200.png");
178 else
179 uri = ref new Windows::Foundation::Uri("ms-appx:///Assets/TESTS/logo-ring.scale-150.png");
180
181 bitmapImage->UriSource = uri;
182 img->Source = bitmapImage;
183 _loadingImage_->Source = img->Source;
184
185 _loadingImage_->SetValue(Canvas::LeftProperty, bounds.Width * 0.5 - _loadingImage_->Width * 0.5);
186 _loadingImage_->SetValue(Canvas::TopProperty, bounds.Height * 0.5 - _loadingImage_->Height * 0.5);
187}
188
189void
190RingClientUWP::MainPage::PositionRing()
191{
192 double left;
193 double top;
194 if (bounds.Width < 1200) {
195 _splashProgressRing_->Width = 118;
196 _splashProgressRing_->Height = 118;
197 left = bounds.Width * 0.5 - _loadingImage_->Width * 0.5 - 145;
198 top = bounds.Height * 0.5 - _loadingImage_->Height * 0.5 - 60;
199 }
200 else {
201 _splashProgressRing_->Width = 162;
202 _splashProgressRing_->Height = 162;
203 left = bounds.Width * 0.5 - _loadingImage_->Width * 0.5 - 195;
204 top = bounds.Height * 0.5 - _loadingImage_->Height * 0.5 - 84;
205 }
206 _splashProgressRing_->SetValue(Canvas::LeftProperty, left + _loadingImage_->Width * 0.5);
207 _splashProgressRing_->SetValue(Canvas::TopProperty, top + _loadingImage_->Height * 0.5);
208}
209
210void
211RingClientUWP::MainPage::OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e)
212{
213 PositionImage();
214 PositionRing();
215}
216
217void
218RingClientUWP::MainPage::DisplayProperties_DpiChanged(DisplayInformation^ sender, Platform::Object^ args)
219{
220 OnResize(nullptr, nullptr);
221}
222
223void
224RingClientUWP::MainPage::hideLoadingOverlay()
225{
226 _loadingOverlay_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
Nicolas Jagerc551c362016-10-01 19:24:50 -0400227}
228
229void RingClientUWP::MainPage::OnsummonMessageTextPage()
230{
231 auto messageTextPage = dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content);
232 messageTextPage->updatePageContent();
233 showFrame(_messageTextFrame_);
234
235}
236
237
238void RingClientUWP::MainPage::OnsummonWelcomePage()
239{
240 showFrame(_welcomeFrame_);
241}
242
atraczykacc4c412016-11-10 22:56:52 -0500243void RingClientUWP::MainPage::OnsummonPreviewPage()
244{
245 WriteLine("Show Settings Preview");
246 _previewFrame_->Visibility = VIS::Visible;
247}
248
249void RingClientUWP::MainPage::OnhidePreviewPage()
250{
251 WriteLine("Hide Settings Preview");
252 _previewFrame_->Visibility = VIS::Collapsed;
253}
Nicolas Jagerc551c362016-10-01 19:24:50 -0400254
255void RingClientUWP::MainPage::OnsummonVideoPage()
256{
257 auto videoPage = dynamic_cast<VideoPage^>(_videoFrame_->Content);
258 videoPage->updatePageContent();
259 showFrame(_videoFrame_);
260}
261
262
263void RingClientUWP::MainPage::OnpressHangUpCall()
264{
265 OnsummonMessageTextPage();
266}
267
Nicolas Jagerc551c362016-10-01 19:24:50 -0400268void RingClientUWP::MainPage::OnstateChange(Platform::String ^callId, RingClientUWP::CallStatus state, int code)
269{
270 auto item = SmartPanelItemsViewModel::instance->_selectedItem;
271
272 switch (state) {
273 /* send the user to the peer's message text page */
atraczyk85e12312016-11-03 10:31:23 -0400274 case CallStatus::ENDED:
Nicolas Jagerc551c362016-10-01 19:24:50 -0400275 {
276 if (item)
277 OnsummonMessageTextPage();
278 break;
279 }
Nicolas Jagerc551c362016-10-01 19:24:50 -0400280 default:
281 break;
282 }
283
284}
atraczykacc4c412016-11-10 22:56:52 -0500285
atraczyk14ba30c2016-09-22 18:31:59 -0400286void
287MainPage::Application_Suspending(Object^, Windows::ApplicationModel::SuspendingEventArgs^ e)
288{
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400289 RingDebug::instance->WriteLine("Application_Suspending");
atraczyk14ba30c2016-09-22 18:31:59 -0400290 if (Frame->CurrentSourcePageType.Name ==
atraczyk6290cc32016-10-07 08:47:15 -0400291 Interop::TypeName(MainPage::typeid).Name) {
atraczyk14ba30c2016-09-22 18:31:59 -0400292 auto deferral = e->SuspendingOperation->GetDeferral();
atraczyk6290cc32016-10-07 08:47:15 -0400293 BeginExtendedExecution()
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400294 .then([=](task<void> previousTask) {
atraczyk6290cc32016-10-07 08:47:15 -0400295 try {
296 previousTask.get();
297 }
298 catch (Exception^ e) {
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400299 RingDebug::instance->WriteLine("Exception: Extended Execution Begin");
atraczyk6290cc32016-10-07 08:47:15 -0400300 }
301 })
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400302 .then([this, deferral](task<void> previousTask) {
atraczyk6290cc32016-10-07 08:47:15 -0400303 try {
304 previousTask.get();
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400305 RingDebug::instance->WriteLine("deferral->Complete()");
atraczyk6290cc32016-10-07 08:47:15 -0400306 deferral->Complete();
307 }
308 catch (Exception^ e) {
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400309 RingDebug::instance->WriteLine("Exception: Extended Execution");
atraczyk6290cc32016-10-07 08:47:15 -0400310 deferral->Complete();
311 }
atraczyk14ba30c2016-09-22 18:31:59 -0400312 });
313 }
314}
315
316void
317MainPage::Application_VisibilityChanged(Object^ sender, VisibilityChangedEventArgs^ e)
318{
atraczykacc4c412016-11-10 22:56:52 -0500319 auto vcm = Video::VideoManager::instance->captureManager();
atraczyk6290cc32016-10-07 08:47:15 -0400320 if (e->Visible) {
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400321 RingDebug::instance->WriteLine("->Visible");
atraczykc8f949a2016-10-07 11:34:03 -0400322 bool isInCall = false;
323 for (auto item : SmartPanelItemsViewModel::instance->itemsList) {
324 if (item->_callId && item->_callStatus == CallStatus::IN_PROGRESS) {
325 isInCall = true;
326 break;
327 }
328 }
329 if (isInCall) {
330 /*if (RingD::instance->currentCallId)
331 RingD::instance->unPauseCall(RingD::instance->currentCallId);*/
atraczykacc4c412016-11-10 22:56:52 -0500332 vcm->InitializeCameraAsync(false);
333 vcm->videoFrameCopyInvoker->Start();
334 }
335 else if (vcm->isSettingsPreviewing) {
336 vcm->CleanupCameraAsync()
337 .then([=](task<void> cleanupTask){
338 cleanupTask.get();
339 CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(
340 CoreDispatcherPriority::High, ref new DispatchedHandler([=]()
341 {
342 vcm->InitializeCameraAsync(true);
343 }));
344 });
atraczykc8f949a2016-10-07 11:34:03 -0400345 }
atraczyk14ba30c2016-09-22 18:31:59 -0400346 }
atraczyk6290cc32016-10-07 08:47:15 -0400347 else {
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400348 RingDebug::instance->WriteLine("->Invisible");
atraczykc8f949a2016-10-07 11:34:03 -0400349 bool isInCall = false;
350 for (auto item : SmartPanelItemsViewModel::instance->itemsList) {
351 if (item->_callId && item->_callStatus == CallStatus::IN_PROGRESS) {
352 isInCall = true;
353 RingD::instance->currentCallId = item->_callId;
354 break;
355 }
356 }
357 if (isInCall) {
atraczykacc4c412016-11-10 22:56:52 -0500358 // TODO
atraczykc8f949a2016-10-07 11:34:03 -0400359 /*if (RingD::instance->currentCallId) {
360 WriteLine("Pausing call: " + RingD::instance->currentCallId);
361 RingD::instance->pauseCall(RingD::instance->currentCallId);
362 }*/
atraczykacc4c412016-11-10 22:56:52 -0500363 if (vcm->isPreviewing) {
364 vcm->StopPreviewAsync();
365 if (vcm->captureTaskTokenSource)
366 vcm->captureTaskTokenSource->cancel();
367 vcm->videoFrameCopyInvoker->Stop();
atraczykc8f949a2016-10-07 11:34:03 -0400368 }
369 }
atraczykacc4c412016-11-10 22:56:52 -0500370 else if (vcm->isSettingsPreviewing) {
371 vcm->StopPreviewAsync();
372 }
atraczyk14ba30c2016-09-22 18:31:59 -0400373 }
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400374}
375
atraczyk6290cc32016-10-07 08:47:15 -0400376void MainPage::Application_Resuming(Object^, Object^)
377{
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400378 RingDebug::instance->WriteLine("Application_Resuming");
atraczyk6290cc32016-10-07 08:47:15 -0400379}
380
381void
382MainPage::SessionRevoked(Object^ sender, ExtendedExecutionRevokedEventArgs^ args)
383{
384 Dispatcher->RunAsync(CoreDispatcherPriority::High, ref new DispatchedHandler([=]() {
385 ClearExtendedExecution();
386 }));
387}
388
389void
390MainPage::ClearExtendedExecution()
391{
392 if (session != nullptr) {
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400393 RingDebug::instance->WriteLine("End Extended Execution");
atraczyk6290cc32016-10-07 08:47:15 -0400394 session->Revoked -= sessionRevokedToken;
395 }
396}
397
398task<void>
399MainPage::BeginExtendedExecution()
400{
401 ClearExtendedExecution();
402
403 auto newSession = ref new ExtendedExecutionSession();
404 newSession->Reason = ExtendedExecutionReason::SavingData;
405 newSession->Description = "Extended Execution";
406 sessionRevokedToken = (newSession->Revoked += ref new TypedEventHandler<Object^,
atraczyk85e12312016-11-03 10:31:23 -0400407 ExtendedExecutionRevokedEventArgs^>(this, &MainPage::SessionRevoked));
atraczyk6290cc32016-10-07 08:47:15 -0400408 return create_task(newSession->RequestExtensionAsync())
atraczyk85e12312016-11-03 10:31:23 -0400409 .then([=](ExtendedExecutionResult result){
atraczyk6290cc32016-10-07 08:47:15 -0400410 try {
411 switch (result)
412 {
413 case ExtendedExecutionResult::Allowed:
414 session = newSession;
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400415 RingDebug::instance->WriteLine("Request Extended Execution Allowed");
416 RingDebug::instance->WriteLine("Clean up camera...");
atraczykacc4c412016-11-10 22:56:52 -0500417 Video::VideoManager::instance->captureManager()->CleanupCameraAsync();
418 RingDebug::instance->WriteLine("Hang up calls...");
419 DRing::fini();
420 gnutls_global_init();
atraczyk6290cc32016-10-07 08:47:15 -0400421 break;
422
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400423 default:
atraczyk6290cc32016-10-07 08:47:15 -0400424 case ExtendedExecutionResult::Denied:
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400425 RingDebug::instance->WriteLine("Request Extended Execution Denied");
atraczyk6290cc32016-10-07 08:47:15 -0400426 break;
427 }
428 }
429 catch (Exception^ e) {
Nicolas Jagerdf0a0672016-10-18 09:25:37 -0400430 RingDebug::instance->WriteLine("Exception: Extended Execution Request");
atraczyk6290cc32016-10-07 08:47:15 -0400431 }
432 });
atraczyk49f1b572016-10-27 12:33:28 -0400433}
Nicolas Jagere72856b2016-10-30 15:06:17 -0400434
435
436void RingClientUWP::MainPage::OncloseMessageTextPage()
437{
438 auto smartPanel = dynamic_cast<SmartPanel^>(_smartPanel_->Content);
439 smartPanel->unselectContact();
440}