blob: 0fde30f7dc3bcddd202d615b68424d85b0fb795f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
using System;
using System.IO;
using AppFW = Tizen.Applications;
namespace Xamarin.Forms.Platform.Tizen
{
public static class ResourcePath
{
public static string GetPath(string res)
{
if (Path.IsPathRooted(res))
{
return res;
}
foreach (AppFW.ResourceManager.Category category in Enum.GetValues(typeof(AppFW.ResourceManager.Category)))
{
var path = AppFW.ResourceManager.TryGetPath(category, res);
if (path != null)
{
return path;
}
}
AppFW.Application app = AppFW.Application.Current;
if (app != null)
{
string resPath = app.DirectoryInfo.Resource + res;
if (File.Exists(resPath))
{
return resPath;
}
}
return res;
}
}
}
|