aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-06-19 18:52:44 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-06-19 18:54:31 -0300
commit09927803c3ae312709e4772297ea84a2016da29e (patch)
tree1e014ffc2db3b3c9a2f329d8593fae00cbb62972
parentefl_ui_suite_spec: add a hack to have running tests again (diff)
downloadefl-devs/lauromoura/csharp_examples.tar.gz
csharp: Fix compilation of examplesdevs/lauromoura/csharp_examples
Still looking strange, though
-rw-r--r--src/examples/elementary/efl_ui_slider_mono.cs16
-rw-r--r--src/examples/elementary/efl_ui_unit_converter.cs28
2 files changed, 22 insertions, 22 deletions
diff --git a/src/examples/elementary/efl_ui_slider_mono.cs b/src/examples/elementary/efl_ui_slider_mono.cs
index c2a3232f14..1a3b4c51ee 100644
--- a/src/examples/elementary/efl_ui_slider_mono.cs
+++ b/src/examples/elementary/efl_ui_slider_mono.cs
@@ -6,12 +6,12 @@ public class Example
public static Efl.Ui.Button CreateButton(Efl.Object parent,
string text,
int w, int h,
- EventHandler callback) {
+ EventHandler<Efl.Ui.IClickableClickedEvt_Args> callback) {
Efl.Ui.Button button = new Efl.Ui.Button(parent);
button.SetText(text);
button.SetSize(new Eina.Size2D(w, h));
- ((Efl.Ui.Clickable)button).ClickedEvt += callback;
+ button.ClickedEvt += callback;
return button;
}
@@ -35,7 +35,7 @@ public class Example
int W = 120;
int H = 30;
- Efl.All.Init(Efl.Components.Ui);
+ Efl.All.Init(Efl.Csharp.Components.Ui);
Efl.Ui.Win win = new Efl.Ui.Win(null);
win.SetText("Hello, C#!!");
@@ -44,11 +44,11 @@ public class Example
Efl.Ui.BoxFlow box = new Efl.Ui.BoxFlow(win);
Efl.Ui.Button button = CreateButton(box, "Click to exit", 120, 30,
- (object sender, EventArgs e) => {
+ (sender, e) => {
Efl.Ui.Config.Exit();
});
- box.DoPack(button);
+ box.Pack(button);
Efl.Ui.Progressbar bar = new Efl.Ui.Progressbar(box);
bar.SetSize(new Eina.Size2D(W, H));
@@ -57,12 +57,12 @@ public class Example
Efl.Ui.Slider slider = new Efl.Ui.Slider(box);
slider.SetSize(new Eina.Size2D(W, H));
- slider.ChangedEvt += (object sender, EventArgs e) => {
+ slider.ChangedEvt += (sender, e) => {
bar.SetRangeValue(slider.GetRangeValue());
};
- box.DoPack(bar);
- box.DoPack(slider);
+ box.Pack(bar);
+ box.Pack(slider);
button.SetVisible(true);
box.SetVisible(true);
diff --git a/src/examples/elementary/efl_ui_unit_converter.cs b/src/examples/elementary/efl_ui_unit_converter.cs
index 3460af3f5f..56c568ec41 100644
--- a/src/examples/elementary/efl_ui_unit_converter.cs
+++ b/src/examples/elementary/efl_ui_unit_converter.cs
@@ -39,19 +39,19 @@ public class Example
int H = 30;
Eina.Size2D size = new Eina.Size2D(W, H);
- Efl.All.Init(Efl.Components.Ui);
+ Efl.All.Init(Efl.Csharp.Components.Ui);
Efl.Ui.Win win = new Efl.Ui.Win(null);
win.SetText("C# Unit Converter");
win.SetAutohide(true);
Efl.Ui.BoxFlow box = new Efl.Ui.BoxFlow(win);
- box.SetDirection(Efl.Ui.Dir.Horizontal);
+ box.SetOrientation(Efl.Ui.LayoutOrientation.Horizontal);
Efl.Ui.BoxFlow miles_box = new Efl.Ui.BoxFlow(box);
- miles_box.SetDirection(Efl.Ui.Dir.Down);
+ miles_box.SetOrientation(Efl.Ui.LayoutOrientation.Vertical);
- box.DoPack(miles_box);
+ box.Pack(miles_box);
Efl.Ui.Text miles_label = new Efl.Ui.Text(miles_box);
miles_label.SetText("Miles:");
@@ -69,15 +69,15 @@ public class Example
miles_button.SetSize(size);
miles_button.SetVisible(true);
- miles_box.DoPack(miles_label);
- miles_box.DoPack(miles_input);
- miles_box.DoPack(miles_button);
+ miles_box.Pack(miles_label);
+ miles_box.Pack(miles_input);
+ miles_box.Pack(miles_button);
Efl.Ui.BoxFlow kms_box = new Efl.Ui.BoxFlow(box);
- kms_box.SetDirection(Efl.Ui.Dir.Down);
+ kms_box.SetOrientation(Efl.Ui.LayoutOrientation.Vertical);
- box.DoPack(kms_box);
+ box.Pack(kms_box);
Efl.Ui.Text kms_label = new Efl.Ui.Text(kms_box);
kms_label.SetText("Kilometers:");
@@ -95,11 +95,11 @@ public class Example
kms_button.SetSize(size);
kms_button.SetVisible(true);
- kms_box.DoPack(kms_label);
- kms_box.DoPack(kms_input);
- kms_box.DoPack(kms_button);
+ kms_box.Pack(kms_label);
+ kms_box.Pack(kms_input);
+ kms_box.Pack(kms_button);
- ((Efl.Ui.Clickable)kms_button).ClickedEvt += (object sender, EventArgs e) => {
+ kms_button.ClickedEvt += (sender, e) => {
try
{
string text = kms_input.GetText();
@@ -115,7 +115,7 @@ public class Example
}
};
- ((Efl.Ui.Clickable)miles_button).ClickedEvt += (object sender, EventArgs e) => {
+ miles_button.ClickedEvt += (sender, e) => {
try
{
string text = miles_input.GetText();