Commit e069c41c authored by Nicolas Jager's avatar Nicolas Jager

Work on Video Page

Change-Id: Iaf495a0220964fa5630fb9a948c1d0a60bae8b32
parent bff5fbb0
......@@ -19,6 +19,7 @@
#include "SmartPanel.xaml.h"
#include "RingConsolePanel.xaml.h"
#include "VideoPage.xaml.h"
#include "WelcomePage.xaml.h"
#include "MainPage.xaml.h"
......@@ -52,6 +53,7 @@ MainPage::MainPage()
_welcomeFrame_->Navigate(TypeName(RingClientUWP::Views::WelcomePage::typeid));
_smartPanel_->Navigate(TypeName(RingClientUWP::Views::SmartPanel::typeid));
_consolePanel_->Navigate(TypeName(RingClientUWP::Views::RingConsolePanel::typeid));
_videoFrame_->Navigate(TypeName(RingClientUWP::Views::VideoPage::typeid));
}
void
......
<Page
x:Class="RingClientUWP.Views.VideoPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RingClientUWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<SolidColorBrush x:Key="SemiTransparentBlack" Color="#000000" Opacity="0.5"/>
<Storyboard x:Name="myStoryboard">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="_controlsBar_"
Storyboard.TargetProperty="Opacity"
Duration="0:0:4">
<LinearDoubleKeyFrame Value="1" KeyTime="0:0:0" />
<LinearDoubleKeyFrame Value="1" KeyTime="0:0:2" />
<LinearDoubleKeyFrame Value="0" KeyTime="0:0:4" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="_headerBar_"
Storyboard.TargetProperty="Opacity"
Duration="0:0:4">
<LinearDoubleKeyFrame Value="1" KeyTime="0:0:0" />
<LinearDoubleKeyFrame Value="1" KeyTime="0:0:2" />
<LinearDoubleKeyFrame Value="0" KeyTime="0:0:4" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Page.Resources>
<SplitView x:Name="_videoSplitView_" IsPaneOpen="False" OpenPaneLength="400" PanePlacement="Right">
<SplitView.Pane>
<Frame x:Name="_chatPanel_"/>
</SplitView.Pane>
<SplitView.Content>
<Grid>
<Image x:Name="_videoControl_"
Source="ms-appx:///fond-video.png"
PointerMoved="_videoControl__PointerMoved"
Stretch="UniformToFill"/>
<StackPanel x:Name="_headerBar_"
Background="{StaticResource SemiTransparentBlack}"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Height="50">
<TextBlock x:Name="_callee_"
Text="callee"
Foreground="White"
Margin="20,10"/>
</StackPanel>
<StackPanel x:Name="_controlsBar_"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="10,30"/>
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="White"/>
</Style>
</StackPanel.Resources>
<Button x:Name="_btnHangUp_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnHangUp__Tapped">
<SymbolIcon Symbol="HangUp"/>
</Button>
<Button x:Name="_btnPause_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnPause__Tapped">
<SymbolIcon Symbol="Pause"/>
</Button>
<Button x:Name="_btnChat_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnChat__Tapped">
<SymbolIcon Symbol="Message"/>
</Button>
<Button x:Name="_btnAddFriend_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnAddFriend__Tapped">
<SymbolIcon Symbol="AddFriend"/>
</Button>
<Button x:Name="_btnSwitch_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnSwitch__Tapped">
<SymbolIcon Symbol="Switch"/>
</Button>
<Button x:Name="_btnMicrophone_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnMicrophone__Tapped">
<SymbolIcon Symbol="Microphone"/>
</Button>
<Button x:Name="_btnVideo_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnVideo__Tapped">
<SymbolIcon Symbol="Video"/>
</Button>
<Button x:Name="_btnMemo_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnMemo__Tapped">
<SymbolIcon Symbol="Memo"/>
</Button>
<Button x:Name="_btnHQ_"
PointerEntered="btnAny_entered"
PointerExited="btnAny_exited"
Tapped="_btnHQ__Tapped">
<TextBlock Text="HQ"/>
</Button>
</StackPanel>
</Grid>
</SplitView.Content>
</SplitView>
</Page>
#include "pch.h"
#include "VideoPage.xaml.h"
using namespace RingClientUWP::Views;
using namespace Concurrency;
using namespace Platform;
using namespace Windows::Devices::Enumeration;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation;
using namespace Windows::Media::Capture;
VideoPage::VideoPage()
{
InitializeComponent();
}
void RingClientUWP::Views::VideoPage::Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
}
void RingClientUWP::Views::VideoPage::_btnCancel__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
}
void RingClientUWP::Views::VideoPage::_btnHangUp__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
pressHangUpCall();
}
void RingClientUWP::Views::VideoPage::_btnPause__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
pauseCall();
}
void RingClientUWP::Views::VideoPage::_btnChat__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
chatPanelCall();
}
void RingClientUWP::Views::VideoPage::_btnAddFriend__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
addContactCall();
}
void RingClientUWP::Views::VideoPage::_btnSwitch__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
transferCall();
}
void RingClientUWP::Views::VideoPage::_btnMicrophone__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
switchMicrophoneStateCall();
}
void RingClientUWP::Views::VideoPage::_btnMemo__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
reccordVideoCall();
}
void RingClientUWP::Views::VideoPage::_btnHQ__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
qualityVideoLevelCall();
}
void RingClientUWP::Views::VideoPage::_btnVideo__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e)
{
switchVideoStateCall();
}
void RingClientUWP::Views::VideoPage::_videoControl__PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{
if (barFading)
myStoryboard->Begin();
barFading_ = true;
}
void RingClientUWP::Views::VideoPage::btnAny_entered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{
barFading_ = false;
myStoryboard->Stop();
}
void RingClientUWP::Views::VideoPage::btnAny_exited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
{
barFading_ = true;
}
void
RingClientUWP::Views::VideoPage::OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e)
{
updatePageContent();
}
void RingClientUWP::Views::VideoPage::updatePageContent()
{
}
\ No newline at end of file
#pragma once
#include "VideoPage.g.h"
using namespace Windows::Media::Capture;
using namespace Windows::UI::Xaml::Navigation;
namespace RingClientUWP
{
/* delegate */
delegate void PressHangUpCall();
delegate void PauseCall();
delegate void ChatPanelCall();
delegate void AddContactCall();
delegate void TransferCall();
delegate void SwitchMicrophoneStateCall();
delegate void SwitchVideoStateCall();
delegate void ReccordVideoCall();
delegate void QualityVideoLevelCall();
namespace Views
{
public ref class VideoPage sealed
{
public:
VideoPage();
property bool barFading
{
bool get()
{
return barFading_;
}
void set(bool value)
{
barFading_ = value;
}
}
protected:
// Template Support
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
/*virtual void OnNavigatedFrom(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;*/
internal:
/* events */
event PressHangUpCall^ pressHangUpCall;
event PauseCall^ pauseCall;
event ChatPanelCall^ chatPanelCall;
event AddContactCall^ addContactCall;
event TransferCall^ transferCall;
event SwitchMicrophoneStateCall^ switchMicrophoneStateCall;
event SwitchVideoStateCall^ switchVideoStateCall;
event ReccordVideoCall^ reccordVideoCall;
event QualityVideoLevelCall^ qualityVideoLevelCall;
private:
bool barFading_;
void updatePageContent();
//void OnNavigatedToPage(Object^ sender, NavigationEventArgs^ e);
void Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void _btnCancel__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void _btnHangUp__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnPause__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnChat__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnAddFriend__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnSwitch__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnMicrophone__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnMemo__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnHQ__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _btnVideo__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
void _videoControl__PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
void btnAny_entered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
void btnAny_exited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
};
}
}
\ No newline at end of file
......@@ -149,6 +149,9 @@
<Page Include="SmartPanel.xaml">
<Filter>Views</Filter>
</Page>
<Page Include="VideoPage.xaml">
<Filter>Views</Filter>
</Page>
</ItemGroup>
<ItemGroup>
<PRIResource Include="localization\US-en\Resources.resw">
......
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