summaryrefslogtreecommitdiff
path: root/unsorted/elementary/efl_ui_unit_converter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'unsorted/elementary/efl_ui_unit_converter.cs')
-rw-r--r--unsorted/elementary/efl_ui_unit_converter.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/unsorted/elementary/efl_ui_unit_converter.cs b/unsorted/elementary/efl_ui_unit_converter.cs
index 09c9b24d..ed5b434a 100644
--- a/unsorted/elementary/efl_ui_unit_converter.cs
+++ b/unsorted/elementary/efl_ui_unit_converter.cs
@@ -14,16 +14,16 @@ public class Example
14 return miles * KMS_PER_MILE; 14 return miles * KMS_PER_MILE;
15 } 15 }
16 16
17 private static void ShowErrorPopup(efl.ui.Win win, string message) 17 private static void ShowErrorPopup(Efl.Ui.Win win, string message)
18 { 18 {
19 efl.ui.IPopup_Alert popup = new efl.ui.Popup_Alert(win); 19 Efl.Ui.Popup_Alert popup = new Efl.Ui.Popup_Alert(win);
20 efl.ui.Text popup_text = new efl.ui.Text(popup); 20 Efl.Ui.Text popup_text = new Efl.Ui.Text(popup);
21 popup_text.SetText($"Error: {message}"); 21 popup_text.SetText($"Error: {message}");
22 popup.SetContent(popup_text); 22 popup.SetContent(popup_text);
23 popup.SetVisible(true); 23 popup.SetVisible(true);
24 popup.SetButton(efl.ui.Popup_Alert_Button.Positive, "Ok"); 24 popup.SetButton(Efl.Ui.Popup_Alert_Button.Positive, "Ok");
25 popup.SetSize(new eina.Size2D(150, 30)); 25 popup.SetSize(new Eina.Size2D(150, 30));
26 popup.ButtonClickedEvt += (object sender, efl.ui.Popup_Alert.ButtonClickedEvt_Args e) => { 26 popup.ButtonClickedEvt += (object sender, Efl.Ui.Popup_Alert.ButtonClickedEvt_Args e) => {
27 popup.SetParent(null); 27 popup.SetParent(null);
28 popup.Invalidate(); 28 popup.Invalidate();
29 }; 29 };
@@ -37,34 +37,34 @@ public class Example
37 public static void Main() { 37 public static void Main() {
38 int W = 120; 38 int W = 120;
39 int H = 30; 39 int H = 30;
40 eina.Size2D size = new eina.Size2D(W, H); 40 Eina.Size2D size = new Eina.Size2D(W, H);
41 41
42 efl.All.Init(efl.Components.Ui); 42 Efl.All.Init(Efl.Components.Ui);
43 43
44 efl.ui.Win win = new efl.ui.Win(null); 44 Efl.Ui.Win win = new Efl.Ui.Win(null);
45 win.SetText("C# Unit Converter"); 45 win.SetText("C# Unit Converter");
46 win.SetAutohide(true); 46 win.SetAutohide(true);
47 47
48 efl.ui.Box_Flow box = new efl.ui.Box_Flow(win); 48 Efl.Ui.Box_Flow box = new Efl.Ui.Box_Flow(win);
49 box.SetDirection(efl.ui.Dir.Horizontal); 49 box.SetDirection(Efl.Ui.Dir.Horizontal);
50 50
51 efl.ui.Box_Flow miles_box = new efl.ui.Box_Flow(box); 51 Efl.Ui.Box_Flow miles_box = new Efl.Ui.Box_Flow(box);
52 miles_box.SetDirection(efl.ui.Dir.Down); 52 miles_box.SetDirection(Efl.Ui.Dir.Down);
53 53
54 box.DoPack(miles_box); 54 box.DoPack(miles_box);
55 55
56 efl.ui.Text miles_label = new efl.ui.Text(miles_box); 56 Efl.Ui.Text miles_label = new Efl.Ui.Text(miles_box);
57 miles_label.SetText("Miles:"); 57 miles_label.SetText("Miles:");
58 miles_label.SetSize(size); 58 miles_label.SetSize(size);
59 miles_label.SetVisible(true); 59 miles_label.SetVisible(true);
60 60
61 efl.ui.Text_Editable miles_input = new efl.ui.Text_Editable(miles_box); 61 Efl.Ui.Text_Editable miles_input = new Efl.Ui.Text_Editable(miles_box);
62 miles_input.SetText(""); 62 miles_input.SetText("");
63 miles_input.SetScrollable(true); 63 miles_input.SetScrollable(true);
64 miles_input.SetSize(size); 64 miles_input.SetSize(size);
65 miles_input.SetVisible(true); 65 miles_input.SetVisible(true);
66 66
67 efl.ui.IButton miles_button = new efl.ui.Button(miles_box); 67 Efl.Ui.Button miles_button = new Efl.Ui.Button(miles_box);
68 miles_button.SetText("To Km"); 68 miles_button.SetText("To Km");
69 miles_button.SetSize(size); 69 miles_button.SetSize(size);
70 miles_button.SetVisible(true); 70 miles_button.SetVisible(true);
@@ -74,23 +74,23 @@ public class Example
74 miles_box.DoPack(miles_button); 74 miles_box.DoPack(miles_button);
75 75
76 76
77 efl.ui.Box_Flow kms_box = new efl.ui.Box_Flow(box); 77 Efl.Ui.Box_Flow kms_box = new Efl.Ui.Box_Flow(box);
78 kms_box.SetDirection(efl.ui.Dir.Down); 78 kms_box.SetDirection(Efl.Ui.Dir.Down);
79 79
80 box.DoPack(kms_box); 80 box.DoPack(kms_box);
81 81
82 efl.ui.Text kms_label = new efl.ui.Text(kms_box); 82 Efl.Ui.Text kms_label = new Efl.Ui.Text(kms_box);
83 kms_label.SetText("Kilometers:"); 83 kms_label.SetText("Kilometers:");
84 kms_label.SetSize(size); 84 kms_label.SetSize(size);
85 kms_label.SetVisible(true); 85 kms_label.SetVisible(true);
86 86
87 efl.ui.Text_Editable kms_input = new efl.ui.Text_Editable(kms_box); 87 Efl.Ui.Text_Editable kms_input = new Efl.Ui.Text_Editable(kms_box);
88 kms_input.SetText(""); 88 kms_input.SetText("");
89 kms_input.SetScrollable(true); 89 kms_input.SetScrollable(true);
90 kms_input.SetSize(size); 90 kms_input.SetSize(size);
91 kms_input.SetVisible(true); 91 kms_input.SetVisible(true);
92 92
93 efl.ui.IButton kms_button = new efl.ui.Button(kms_box); 93 Efl.Ui.Button kms_button = new Efl.Ui.Button(kms_box);
94 kms_button.SetText("To Miles"); 94 kms_button.SetText("To Miles");
95 kms_button.SetSize(size); 95 kms_button.SetSize(size);
96 kms_button.SetVisible(true); 96 kms_button.SetVisible(true);
@@ -134,17 +134,17 @@ public class Example
134 kms_box.SetVisible(true); 134 kms_box.SetVisible(true);
135 miles_box.SetVisible(true); 135 miles_box.SetVisible(true);
136 136
137 box.SetPosition(new eina.Position2D(20, 30)); 137 box.SetPosition(new Eina.Position2D(20, 30));
138 box.SetVisible(true); 138 box.SetVisible(true);
139 139
140 win.SetPosition(new eina.Position2D(200, 200)); 140 win.SetPosition(new Eina.Position2D(200, 200));
141 141
142 win.SetSize(new eina.Size2D(400, 120)); 142 win.SetSize(new Eina.Size2D(400, 120));
143 win.SetVisible(true); 143 win.SetVisible(true);
144 144
145 efl.ui.Config.Run(); 145 Efl.Ui.Config.Run();
146 146
147 efl.All.Shutdown(); 147 Efl.All.Shutdown();
148 } 148 }
149 149
150} 150}