manual nui merge 0.2.38
[platform/core/csapi/nui.git] / NUISamples / NUISamples / NUISamples.TizenTV / examples / visuals-using-custom-view / ContactData.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using Tizen.NUI;
20 using Tizen.NUI.Constants;
21
22 namespace VisualsUsingCustomView
23 {
24     // The collection of contacts
25     static class ContactsList
26     {
27         private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
28
29         public static readonly ContactItem[] s_contactData = new ContactItem[]
30         {
31             new ContactItem ("Emmett Yates", resources + "/images/gallery-small-43.jpg",
32                              new Color((73.0f/255.0f),(182.0f/255.0f), (245.0f/255.0f), 1.0f),
33                              (int)PrimitiveVisualShapeType.Cone),
34             new ContactItem ("Leslie Wong", resources+ "/images/gallery-2.jpg",
35                              new Color((51.0f/255.0f), (51.0f/255.0f), (102.0f/255.0f), 1.0f),
36                              (int)PrimitiveVisualShapeType.Sphere),
37             new ContactItem ("Walter Jensen", resources+ "/images/gallery-0.jpg",
38                              new Color((151.0f/255.0f), (214.0f/255.0f), (240.0f/255.0f), 1.0f),
39                              (int)PrimitiveVisualShapeType.Cylinder),
40             new ContactItem ("Dan Haynes", resources+"/images/gallery-1.jpg",
41                              new Color((102.0f/255.0f), (251.0f/255.0f), (102.0f/255.0f), 1.0f),
42                              (int)PrimitiveVisualShapeType.ConicalFrustrum),
43             new ContactItem ("Mable Hodges", resources+"/images/gallery-3.jpg",
44                              new Color((255.0f/255.0f), (102.0f/255.0f), (102.0f/255.0f), 1.0f),
45                              (int)PrimitiveVisualShapeType.Cube)
46         };
47     }
48
49     // The information for an individual contact
50     class ContactItem
51     {
52         private string _name;
53         private string _imageURL;
54         private Color _color;
55         private int _shape;
56
57         public ContactItem(string name, string imageURL, Color color, int shape)
58         {
59             _name = name;
60             _imageURL = imageURL;
61             _color = color;
62             _shape = shape;
63         }
64
65         public string ImageURL
66         {
67             get
68             {
69                 return _imageURL;
70             }
71             set
72             {
73                 _imageURL = value;
74             }
75         }
76
77         public string Name
78         {
79             get
80             {
81                 return _name;
82             }
83             set
84             {
85                 _name = value;
86             }
87         }
88
89         public Color Color
90         {
91             get
92             {
93                 return _color;
94             }
95             set
96             {
97                 _color = value;
98             }
99         }
100
101         public int Shape
102         {
103             get
104             {
105                 return _shape;
106             }
107             set
108             {
109                 _shape = value;
110             }
111         }
112     }
113 }