csharp: Update examples after repeated method name

Summary:
In essence, IPack.DoPack became IPack.Pack

Depends on D8650

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D8651
devs/lauromoura/cv
Lauro Moura 3 years ago committed by Xavi Artigas
parent f47f1f3672
commit 595be4aa12
  1. 8
      apps/csharp/texteditor/src/texteditor_main.cs
  2. 8
      reference/csharp/ui/src/focus_main.cs
  3. 4
      reference/csharp/ui/src/ui_container.cs
  4. 6
      reference/csharp/ui/src/ui_sizing.cs
  5. 4
      tutorial/csharp/hello-gui/src/gui_main.cs

@ -84,7 +84,7 @@ public class TextEditor : Efl.Csharp.Application
image.SetIcon(iconName);
button.SetContent(image);
toolbar.DoPack(button);
toolbar.Pack(button);
return button;
}
@ -98,7 +98,7 @@ public class TextEditor : Efl.Csharp.Application
// space will be given to the other object in the parent container.
bar.SetHintWeight(1, 0);
bar.SetDirection(Efl.Ui.Dir.Horizontal);
parent.DoPack(bar);
parent.Pack(bar);
// "New" button
toolbarButtonNew = GUIToolbarButtonAdd(bar, "New", "document-new",
@ -144,7 +144,7 @@ public class TextEditor : Efl.Csharp.Application
// As a result, it pushes the "Quit" button to the right margin and
// the rest to the left.
Efl.Ui.Box box = new Efl.Ui.Box(parent);
bar.DoPack(box);
bar.Pack(box);
// "Quit" button
GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, EventArgs e) => { Efl.Ui.Config.Exit(); } );
@ -175,7 +175,7 @@ public class TextEditor : Efl.Csharp.Application
editorTextBox.SetHintSizeMin(new Eina.Size2D(360, 240));
editorTextBox.ChangedEvt += EditorChangedCb;
editorTextBox.ChangedUserEvt += EditorChangedCb;
box.DoPack(editorTextBox);
box.Pack(editorTextBox);
// Initial refresh of the toolbar buttons
GUIToolbarRefresh();

@ -32,14 +32,14 @@ public class Example : Efl.Csharp.Application
checkbox.SetText("Check " + i);
checkbox.SetHintAlign(0.5, 0.5);
checkbox.FocusChangedEvt += FocusChangedCb;
vbox.DoPack(checkbox);
vbox.Pack(checkbox);
if (i == 0) first_checkbox = checkbox;
};
// Create an horizontal box to contain the two buttons
var hbox = new Efl.Ui.Box(vbox);
hbox.SetDirection(Efl.Ui.Dir.Horizontal);
vbox.DoPack(hbox);
vbox.Pack(hbox);
// Create a "Focus Mover" button
var button = new Efl.Ui.Button(hbox);
@ -50,7 +50,7 @@ public class Example : Efl.Csharp.Application
// Manually transfer focus to the first check box
Efl.Ui.Focus.Util.Focus(first_checkbox);
};
hbox.DoPack(button);
hbox.Pack(button);
// Create a Quit button
button = new Efl.Ui.Button(hbox);
@ -60,7 +60,7 @@ public class Example : Efl.Csharp.Application
Console.WriteLine("Clicked Quit");
Efl.Ui.Config.Exit();
};
hbox.DoPack(button);
hbox.Pack(button);
// Show the focus highlight
win.SetFocusHighlightEnabled(true);

@ -26,7 +26,7 @@ public class Example : Efl.Csharp.Application
// Button 2 has its maximum size limited, so it will be smaller
button.SetHintSizeMax(new Eina.Size2D(100,50));
}
box.DoPack(button);
box.Pack(button);
}
return box;
@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application
// Add 4 buttons, following the defined table flow
button = new Efl.Ui.Button(win);
button.SetText($"Table {i}");
table.DoPack(button);
table.Pack(button);
}
// Last button spans two table cells

@ -29,19 +29,19 @@ public class Example : Efl.Csharp.Application
// Create a regular button (without size hints)
var button = new Efl.Ui.Button(win);
button.SetText("Button");
box.DoPack(button);
box.Pack(button);
// Create a small button (max size is limited)
button = new Efl.Ui.Button(win);
button.SetText("Small");
button.SetHintSizeMax(new Eina.Size2D(50,50));
box.DoPack(button);
box.Pack(button);
// Create a big button (min size is limited)
button = new Efl.Ui.Button(win);
button.SetText("Big button");
button.SetHintSizeMin(new Eina.Size2D(100,100));
box.DoPack(button);
box.Pack(button);
}
#if WIN32

@ -38,7 +38,7 @@ public class Example : Efl.Csharp.Application
label.SetHintWeight(1.0, 0.9);
label.SetHintAlign(0.5, 0.5);
// Add the text to the box container
box.DoPack(label);
box.Pack(label);
// Create a button widget
var button = new Efl.Ui.Button(box);
@ -48,7 +48,7 @@ public class Example : Efl.Csharp.Application
// Set the method to be called when the button is pressed
button.ClickedEvt += (object sender, EventArgs e) => { Efl.App.AppMain.Quit(0); };
// Add the button to the box container
box.DoPack(button);
box.Pack(button);
}
#if WIN32

Loading…
Cancel
Save