-
Notifications
You must be signed in to change notification settings - Fork 3
/
MainPage1.xaml.cs
56 lines (43 loc) · 1.52 KB
/
MainPage1.xaml.cs
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using Newtonsoft.Json;
using System.Collections.Generic;
using Tizen;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
namespace jjangchin_kiosk{
public partial class MainPage1 : View
{
public MainPage1()
{
InitializeComponent();
}
private void Button_ClickEvent1(object sender, Tizen.NUI.Components.Button e)
{
Window.Instance.Add(new KioskPage1());
}
private void Button_ClickEvent2(object sender, Tizen.NUI.Components.Button e)
{
Window.Instance.Add(new EasySelectPage());
}
public ImageView Icon { get; }
private void textField_TextChanged(object sender, TextField.TextChangedEventArgs e)
{
Program.nowUserId = e.TextField.Text;
if (e.TextField.Text.Length == 16)
{
Log.Info("owjs3901", "LOGIN");
var obj = JsonConvert.DeserializeObject<Dictionary<string, object>>(Utils.Request("/user/" + e.TextField.Text));
if(!obj.ContainsKey("res"))
{
Program.nowUser = obj;
}
else
{
Program.nowUser = JsonConvert.DeserializeObject<Dictionary<string, object>>(Utils.RequestPost("/user/" + e.TextField.Text));
}
Log.Fatal("owjs3901", "NOW!!");
Window.Instance.Add(new KioskPage2());
}
Tizen.Log.Info("NUI", "Data Changed" + e.TextField.Text + "\n");
}
}
}