/// Create test ConferenceCallViewModel
/// </summary>
/// <returns>ConferenceCallViewModel</returns>
- public static CallViewModel CreateConferenceCallViewModel()
+ public static ConferenceCallViewModel CreateConferenceCallViewModel()
{
CallModel callModelAS = new CallModel(0);
callModelAS.ContactModel.Name = "John Doe";
return new ConferenceCallViewModel(callManager);
}
+
+ /// <summary>
+ /// Create test EndCallViewModel
+ /// </summary>
+ /// <returns>EndCallViewModel</returns>
+ public static EndCallViewModel CreateEndCallViewModel()
+ {
+ EndCallViewModel vm = new EndCallViewModel(new CallManager())
+ {
+ EndCall = new CallModel(0)
+ {
+ Status = CallStatus.End
+ }
+ };
+
+ vm.EndCall.ContactModel.Name = "Ruslan Zakharov";
+ vm.EndCall.CallerNumber = "+380676470707";
+
+ return vm;
+ }
}
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="CallApp.Tizen.Call.Theme.FlatControlTheme">
+
+ <Color x:Key="FlatControlBorderColor">#FFD9D9D9</Color>
+ <Color x:Key="FlatControlCheckOffColor">#4C666666</Color>
+ <Color x:Key="FlatControlCheckOnColor">#FF2EB4C8</Color>
+ <Color x:Key="FlatControlDimColor">#4D4D4D4D</Color>
+ <Color x:Key="FlatControlImageNormalColor">#FF808080</Color>
+ <Color x:Key="FlatControlNormalColor">#FFFAFAFA</Color>
+ <Color x:Key="FlatControlTextNormalColor">#FF808080</Color>
+</ResourceDictionary>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms;
+
+namespace CallApp.Tizen.Call.Theme
+{
+ /// <summary>
+ /// Theme for FlatButton and FlatCheckbox controls
+ /// </summary>
+ public partial class FlatControlTheme : ResourceDictionary
+ {
+ public FlatControlTheme()
+ {
+ InitializeComponent();
+ }
+ }
+}
x:Class="CallApp.Tizen.Call.View.Controls.CallHandlingPanel"
x:Name="This"
xmlns:CallControls="clr-namespace:CallApp.Tizen.Call.View.Controls"
+ xmlns:CallTheme="clr-namespace:CallApp.Tizen.Call.Theme"
xmlns:Localization="clr-namespace:CallApp.Tizen.Localization"
xmlns:TizenUtilityControls="clr-namespace:Tizen.Utility.Controls">
<ContentView.Resources>
- <ResourceDictionary>
- <Color x:Key="FlatControlBorderColor">#FFD9D9D9</Color>
- <Color x:Key="FlatControlCheckOffColor">#4C666666</Color>
- <Color x:Key="FlatControlCheckOnColor">#FF2EB4C8</Color>
- <Color x:Key="FlatControlDimColor">#4D4D4D4D</Color>
- <Color x:Key="FlatControlImageNormalColor">#FF808080</Color>
- <Color x:Key="FlatControlNormalColor">#FFFAFAFA</Color>
- <Color x:Key="FlatControlTextNormalColor">#FF808080</Color>
-
+ <ResourceDictionary MergedWith="CallTheme:FlatControlTheme">
<Style TargetType="CallControls:FlatButton">
<Setter Property="ImageMargin" Value="0,37,0,0" />
<Setter Property="HeightRequest" Value="188" />
TextColor="{StaticResource DefaultTextColor}" FontSize="27" Text="{TemplateBinding StatusText}" />
<Image Grid.Column="0" Grid.Row="2" Margin="32,0,32,0" WidthRequest="168" HeightRequest="168"
- HorizontalOptions="Center" VerticalOptions="Center" Source="{TemplateBinding Image}" />
+ HorizontalOptions="Center" VerticalOptions="Center">
+ <Image.Triggers>
+ <DataTrigger TargetType="Image" Binding="{TemplateBinding Image, Converter={StaticResource IsNull}}" Value="True">
+ <Setter Property="Source" Value="Call ID/168x168/call_end_photo_id_default.png" />
+ </DataTrigger>
+
+ <DataTrigger TargetType="Image" Binding="{TemplateBinding Image, Converter={StaticResource IsNull}}" Value="False">
+ <Setter Property="Source" Value="{TemplateBinding Image}" />
+ </DataTrigger>
+ </Image.Triggers>
+ </Image>
<TizenUtilityControls:CustomGrid Grid.Column="1" Grid.Row="2">
<Grid.RowDefinitions>
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- x:Class="CallApp.Tizen.Call.View.EndCallView">
+ x:Class="CallApp.Tizen.Call.View.EndCallView"
+ xmlns:CallControls="clr-namespace:CallApp.Tizen.Call.View.Controls"
+ xmlns:CallTheme="clr-namespace:CallApp.Tizen.Call.Theme"
+ xmlns:Localization="clr-namespace:CallApp.Tizen.Localization">
+ <ContentView.Resources>
+ <ResourceDictionary MergedWith="CallTheme:FlatControlTheme">
+ <Style TargetType="CallControls:FlatButton">
+ <Setter Property="ImageMargin" Value="0,36,0,0" />
+ <Setter Property="ImageColor" Value="{StaticResource FlatControlImageNormalColor}" />
+ <Setter Property="TextColor" Value="{StaticResource FlatControlTextNormalColor}" />
+ <Setter Property="DimColor" Value="{StaticResource FlatControlDimColor}" />
+ <Setter Property="NormalColor" Value="{StaticResource FlatControlNormalColor}" />
+ </Style>
+
+ <Style TargetType="Frame">
+ <Setter Property="HorizontalOptions" Value="FillAndExpand" />
+ <Setter Property="OutlineColor" Value="{StaticResource FlatControlBorderColor}" />
+ <Setter Property="HasShadow" Value="False" />
+ </Style>
+ </ResourceDictionary>
+ </ContentView.Resources>
+
+ <StackLayout>
+ <CallControls:ContactInfoPanel LayoutType="Top" StatusText="{x:Static Localization:Localization.EndCall}"
+ PrimaryText="{Binding EndCall.ContactModel.Name}" SecondaryText="{Binding EndCall.CallerNumber}" />
+
+ <StackLayout HeightRequest="190" Orientation="Horizontal">
+ <Frame Padding="0,0,1,0">
+ <CallControls:FlatButton Image="call_end_ic_call.png" Text="{x:Static Localization:Localization.CallBack}" Command="{Binding CallBackCommand}" />
+ </Frame>
+
+ <Frame Padding="1,0,0,0">
+ <CallControls:FlatButton Image="call_end_message.png" Text="{x:Static Localization:Localization.Message}" Command="{Binding MessageCommand}" />
+ </Frame>
+ </StackLayout>
+ </StackLayout>
</ContentView>
\ No newline at end of file
*/
using CallApp.Tizen.Call.Manager;
+using CallApp.Tizen.Call.Model;
+using System.Windows.Input;
using Tizen.Utility.Helpers;
+using Xamarin.Forms;
namespace CallApp.Tizen.Call.ViewModel
{
public EndCallViewModel(CallManager callManager)
{
_callManager = callManager;
+
+ CallBackCommand = new Command(CallBack);
+ MessageCommand = new Command(Message);
}
/// <summary>
- /// Callback a call
+ /// Command for call back
/// </summary>
- public void CallBack()
+ public ICommand CallBackCommand
{
+ get;
+ private set;
}
/// <summary>
- /// Send a message
+ /// Command for sending message
/// </summary>
- public void Message()
+ public ICommand MessageCommand
+ {
+ get;
+ private set;
+ }
+
+ /// <summary>
+ /// Call in end status
+ /// </summary>
+ private CallModel _endCall = null;
+ public CallModel EndCall
+ {
+ get
+ {
+ return _endCall;
+ }
+ set
+ {
+ _endCall = value;
+
+ OnPropertyChanged();
+ }
+ }
+
+ private void CallBack(object obj)
+ {
+ }
+
+ private void Message(object obj)
{
}
}
protected override void OnCreate()
{
base.OnCreate();
+
LoadApplication(new App());
}
<Compile Include="Call\Model\ConferenceCallModel.cs" />
<Compile Include="Call\Model\ContactModel.cs" />
<Compile Include="Call\Provider\ContactProvider.cs" />
+ <Compile Include="Call\Theme\FlatControlTheme.xaml.cs">
+ <DependentUpon>FlatControlTheme.xaml</DependentUpon>
+ </Compile>
<Compile Include="Call\ViewModel\CallViewModel.cs" />
<Compile Include="Call\ViewModel\MiniIncomingCallViewModel.cs" />
<Compile Include="Call\ViewModel\ConferenceCallViewModel.cs" />
<Folder Include="lib\" />
</ItemGroup>
<ItemGroup>
+ <Content Include="res\Call ID\168x168\call_end_photo_id_default.png" />
<Content Include="res\Call ID\348x348\call_photo_id.png" />
<Content Include="res\Call ID\348x348\call_photo_id_conference.png" />
<Content Include="res\Call ID\348x348\call_photo_id_emergency.png" />
<Content Include="res\call_btn_mute.png" />
<Content Include="res\call_btn_volume.png" />
<Content Include="res\call_button_bg_accept_reject.png" />
+ <Content Include="res\call_end_ic_call.png" />
+ <Content Include="res\call_end_message.png" />
<Content Include="res\call_inline_btn_close.png" />
<Content Include="res\call_inline_btn_open.png" />
<Content Include="res\call_lock_icon.png" />
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Call\Theme\FlatControlTheme.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.