[Tizen] Update NUISamples to support .netcore 2.0
[platform/core/csapi/nui.git] / NUISamples / 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/SERILOCAL/david.steele/Git/Tizen/nui/NUISamples/NUISamples/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                              resources + "/images/mask.png",
33                              new Color((73.0f/255.0f),(182.0f/255.0f), (245.0f/255.0f), 1.0f),
34                              (int)PrimitiveVisualShapeType.Cone),
35             new ContactItem ("Leslie Wong", resources+ "/images/gallery-2.jpg",
36                              resources + "/images/mask.png",
37                              new Color((51.0f/255.0f), (51.0f/255.0f), (102.0f/255.0f), 1.0f),
38                              (int)PrimitiveVisualShapeType.Sphere),
39             new ContactItem ("Walter Jensen", resources+ "/images/gallery-0.jpg",
40                              resources + "/images/mask.png",
41                              new Color((151.0f/255.0f), (214.0f/255.0f), (240.0f/255.0f), 1.0f),
42                              (int)PrimitiveVisualShapeType.Cylinder),
43             new ContactItem ("Dan Haynes", resources+"/images/gallery-1.jpg",
44                              resources + "/images/mask.png",
45                              new Color((102.0f/255.0f), (251.0f/255.0f), (102.0f/255.0f), 1.0f),
46                              (int)PrimitiveVisualShapeType.ConicalFrustrum),
47             new ContactItem ("Mable Hodges", resources+"/images/gallery-3.jpg",
48                              resources + "/images/mask.png",
49                              new Color((255.0f/255.0f), (102.0f/255.0f), (102.0f/255.0f), 1.0f),
50                              (int)PrimitiveVisualShapeType.Cube)
51         };
52     }
53
54     // The information for an individual contact
55     class ContactItem
56     {
57         private string _name;
58         private string _imageURL;
59         private Color _color;
60         private int _shape;
61         private string _maskURL;
62
63         public ContactItem(string name, string imageURL, string maskURL, Color color, int shape)
64         {
65             _name = name;
66             _imageURL = imageURL;
67             _maskURL = maskURL;
68             _color = color;
69             _shape = shape;
70         }
71
72         public string ImageURL
73         {
74             get
75             {
76                 return _imageURL;
77             }
78             set
79             {
80                 _imageURL = value;
81             }
82         }
83         public string MaskURL
84         {
85             get
86             {
87                 return _maskURL;
88             }
89             set
90             {
91                 _maskURL = value;
92             }
93         }
94
95         public string Name
96         {
97             get
98             {
99                 return _name;
100             }
101             set
102             {
103                 _name = value;
104             }
105         }
106
107         public Color Color
108         {
109             get
110             {
111                 return _color;
112             }
113             set
114             {
115                 _color = value;
116             }
117         }
118
119         public int Shape
120         {
121             get
122             {
123                 return _shape;
124             }
125             set
126             {
127                 _shape = value;
128             }
129         }
130     }
131 }