summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-06-23 00:57:31 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-06-23 00:57:31 +0000
commitcde2bc8741e2047e5dab7b8560b161eecfc1bd53 (patch)
tree9b8d6619b4894b35ce9208747bb086351191d0fd
parente0b161876ee30280653bde512a250176167d3b26 (diff)
parent2e3e865935b56f56856551d639ec3f3fb187e02b (diff)
downloadelm-sharp-cde2bc8741e2047e5dab7b8560b161eecfc1bd53.tar.gz
elm-sharp-cde2bc8741e2047e5dab7b8560b161eecfc1bd53.tar.bz2
elm-sharp-cde2bc8741e2047e5dab7b8560b161eecfc1bd53.zip
Merge "Add test scenario for checking Toolbar operation" into tizen
-rwxr-xr-xElmSharp.Test/TC/ToolbarTest2.cs36
1 files changed, 25 insertions, 11 deletions
diff --git a/ElmSharp.Test/TC/ToolbarTest2.cs b/ElmSharp.Test/TC/ToolbarTest2.cs
index 8e19d1d..07780fb 100755
--- a/ElmSharp.Test/TC/ToolbarTest2.cs
+++ b/ElmSharp.Test/TC/ToolbarTest2.cs
@@ -30,7 +30,7 @@ namespace ElmSharp.Test
{
Conformant conformant = new Conformant(window);
conformant.Show();
- Box outterBox = new Box(window)
+ Box outerBox = new Box(window)
{
AlignmentX = -1,
AlignmentY = -1,
@@ -39,20 +39,18 @@ namespace ElmSharp.Test
IsHorizontal = false,
BackgroundColor = Color.Aqua,
};
- outterBox.Show();
+ outerBox.Show();
Toolbar toolbar = new Toolbar(window)
{
AlignmentX = -1,
WeightX = 1,
};
-
toolbar.Show();
- outterBox.PackEnd(toolbar);
+ outerBox.PackEnd(toolbar);
- int idx = 1;
- ToolbarItem item = toolbar.Append(string.Format("{0} home", idx), "home");
- idx++;
+ List<ToolbarItem> items = new List<ToolbarItem>();
+ items.Add(toolbar.Append(string.Format("{0} home", items.Count), "home"));
Button bt = new Button(window)
{
@@ -61,13 +59,29 @@ namespace ElmSharp.Test
};
bt.Clicked += (s, e) =>
{
- ToolbarItem item2 = toolbar.Append(string.Format("{0} home", idx), "home");
- idx++;
+ items.Add(toolbar.Append(string.Format("{0} home", items.Count), "home"));
+ };
+
+ Button removebt = new Button(window)
+ {
+ Text = "Remove first ToolbarItem",
+ MinimumWidth = 400
+ };
+ removebt.Clicked += (s, e) =>
+ {
+ foreach (var cur in items)
+ {
+ items.Remove(cur);
+ cur.Delete();
+ return;
+ }
};
bt.Show();
- outterBox.PackEnd(bt);
- conformant.SetContent(outterBox);
+ removebt.Show();
+ outerBox.PackEnd(bt);
+ outerBox.PackEnd(removebt);
+ conformant.SetContent(outerBox);
}
}
}