Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


<img src="banner.png" alt="Xamarin.Forms banner" height="145" >

# Xamarin.Forms #
Expand Down
4 changes: 3 additions & 1 deletion Xamarin.Forms.ControlGallery.Tizen/ControlGallery.Tizen.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Xamarin.Forms.Platform.Tizen;
using Xamarin.Forms.Controls;
using ElmSharp;
using Tizen.Appium;

namespace Xamarin.Forms.ControlGallery.Tizen
{
Expand All @@ -17,8 +18,9 @@ protected override void OnCreate()
static void Main(string[] args)
{
var app = new MainApplication();
FormsMaps.Init("HERE", "write-your-API-key-here");
//FormsMaps.Init("HERE", "write-your-API-key-here");
global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);
TizenAppium.StartService(app);
app.Run(args);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Tizen.Appium\Tizen.Appium.csproj" />
<ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj" />
<ProjectReference Include="..\Xamarin.Forms.Platform\Xamarin.Forms.Platform.csproj" />
<ProjectReference Include="..\Xamarin.Forms.Xaml\Xamarin.Forms.Xaml.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Reflection;
using Xamarin.Forms.CustomAttributes;
using System.Diagnostics;

#if UITEST
using Xamarin.Forms.Core.UITests;
Expand Down Expand Up @@ -49,7 +50,11 @@ static IApp InitializeApp()

#elif __WINDOWS__
app = InitializeUWPApp();

#elif __TIZEN__
app = InitializeTizenApp();
#endif

if (app == null)
throw new NullReferenceException("App was not initialized.");

Expand Down Expand Up @@ -120,8 +125,16 @@ static IApp InitializeUWPApp()
}
#endif

#if __TIZEN__
static IApp InitializeTizenApp()
{
return TizenTestBase.ConfigureApp();
}
#endif

public static void NavigateToIssue(Type type, IApp app)
{
Debug.WriteLine("@@@@@@@@@@ NavigateToIssue @@@@@@@@@");
var typeIssueAttribute = type.GetTypeInfo().GetCustomAttribute<IssueAttribute>();

string cellName = "";
Expand Down Expand Up @@ -166,6 +179,14 @@ public static void NavigateToIssue(Type type, IApp app)
// and then fall back to the old manual navigation
WindowsTestBase.Reset();
#endif

#if __TIZEN__
// Tizen doens't have an 'invoke' option right now for us to do the more direct navigation
// we're using for Android/iOS
// So we're just going to use the 'Reset' method to bounce the app to the opening screen
// and then fall back to the old manual navigation
TizenTestBase.Reset();
#endif
}
catch (Exception ex)
{
Expand Down
65 changes: 65 additions & 0 deletions Xamarin.Forms.Core.Tizen.UITests/BaseViewContainerRemoteTizen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xamarin.Forms.Core.UITests
{
internal abstract partial class BaseViewContainerRemote
{
bool TryConvertFloat<T>(object prop, out T result)
{
result = default(T);

if (prop.GetType() == typeof(string) && typeof(T) == typeof(float))
{
float val;
if (float.TryParse((string)prop, out val))
{
result = (T)((object) val);
return true;
}
}
return false;
}

bool TryConvertDouble<T>(object prop, out T result)
{
result = default(T);

if (prop.GetType() == typeof(string) && typeof(T) == typeof(double))
{
double val;
if (double.TryParse((string)prop, out val))
{
result = (T)((object)val);
return true;
}
}
return false;
}

bool TryConvertFont<T>(object prop, out T result)
{
result = default(T);
if (prop.GetType() == typeof(string) && typeof(T) == typeof(Font))
{
FontAttributes fontAttrs = FontAttributes.None;
string str = (string)prop;
if (str.Contains("FontAttributes: Bold"))
{
fontAttrs = FontAttributes.Bold;
}
else if (str.Contains("FontAttributes: Italic"))
{
fontAttrs = FontAttributes.None;
}
result = (T)((object)new Font().WithAttributes(fontAttrs));
return true;
}

return false;
}
}
}
36 changes: 36 additions & 0 deletions Xamarin.Forms.Core.Tizen.UITests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Xamarin.Forms.Core.Tizen.UITests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Xamarin.Forms.Core.Tizen.UITests")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c4d726e7-6277-48d3-96c1-8ea8ad46c6f0")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading